How to do pagination with grouping in solr search
up vote
0
down vote
favorite
Document structure of solr document is as mentioned below now i need to extract the document having event_name="product view" and group it by email so that email is not duplicate.Now on listing the email how may paginate the unique email.As the query return total number of document not the count of groups
"docs":[
{
"id":"1",
"email":"xxxxxx@gmail.com",
"gender":"M",
"location":["yyy"],
"created":123444,
"event_name":"product viewed",
"event_property":"product",
"event_value":"sun glassed",
"_version_":1617201602734587904,
"location_str":["yyyy"]
},
{
"id":"4",
"email":"xxxxxx@gmail.com",
"gender":"F",
"location":["zzzz"],
"created":123447,
"event_name":"Add To Cart",
"event_property":"Name",
"event_value":"sun glasses",
"_version_":1617202784870858752,
"location_str":["zzzz"]
},
{
"id":"5",
"email":"xxxxxx@gmail.com",
"gender":"M",
"location":["kkkkk"],
"created":123464,
"event_name":"Product Clicked",
"event_property":"Category",
"event_value":"Contact Lens",
"_version_":1617202784871907328,
"location_str":["lllll"]
}
]
solr
add a comment |
up vote
0
down vote
favorite
Document structure of solr document is as mentioned below now i need to extract the document having event_name="product view" and group it by email so that email is not duplicate.Now on listing the email how may paginate the unique email.As the query return total number of document not the count of groups
"docs":[
{
"id":"1",
"email":"xxxxxx@gmail.com",
"gender":"M",
"location":["yyy"],
"created":123444,
"event_name":"product viewed",
"event_property":"product",
"event_value":"sun glassed",
"_version_":1617201602734587904,
"location_str":["yyyy"]
},
{
"id":"4",
"email":"xxxxxx@gmail.com",
"gender":"F",
"location":["zzzz"],
"created":123447,
"event_name":"Add To Cart",
"event_property":"Name",
"event_value":"sun glasses",
"_version_":1617202784870858752,
"location_str":["zzzz"]
},
{
"id":"5",
"email":"xxxxxx@gmail.com",
"gender":"M",
"location":["kkkkk"],
"created":123464,
"event_name":"Product Clicked",
"event_property":"Category",
"event_value":"Contact Lens",
"_version_":1617202784871907328,
"location_str":["lllll"]
}
]
solr
So what's your query? Are you using grouping already? Thegroup.ngroups
parameter tells Solr to include the total group count in the result set in that case.
– MatsLindh
yesterday
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Document structure of solr document is as mentioned below now i need to extract the document having event_name="product view" and group it by email so that email is not duplicate.Now on listing the email how may paginate the unique email.As the query return total number of document not the count of groups
"docs":[
{
"id":"1",
"email":"xxxxxx@gmail.com",
"gender":"M",
"location":["yyy"],
"created":123444,
"event_name":"product viewed",
"event_property":"product",
"event_value":"sun glassed",
"_version_":1617201602734587904,
"location_str":["yyyy"]
},
{
"id":"4",
"email":"xxxxxx@gmail.com",
"gender":"F",
"location":["zzzz"],
"created":123447,
"event_name":"Add To Cart",
"event_property":"Name",
"event_value":"sun glasses",
"_version_":1617202784870858752,
"location_str":["zzzz"]
},
{
"id":"5",
"email":"xxxxxx@gmail.com",
"gender":"M",
"location":["kkkkk"],
"created":123464,
"event_name":"Product Clicked",
"event_property":"Category",
"event_value":"Contact Lens",
"_version_":1617202784871907328,
"location_str":["lllll"]
}
]
solr
Document structure of solr document is as mentioned below now i need to extract the document having event_name="product view" and group it by email so that email is not duplicate.Now on listing the email how may paginate the unique email.As the query return total number of document not the count of groups
"docs":[
{
"id":"1",
"email":"xxxxxx@gmail.com",
"gender":"M",
"location":["yyy"],
"created":123444,
"event_name":"product viewed",
"event_property":"product",
"event_value":"sun glassed",
"_version_":1617201602734587904,
"location_str":["yyyy"]
},
{
"id":"4",
"email":"xxxxxx@gmail.com",
"gender":"F",
"location":["zzzz"],
"created":123447,
"event_name":"Add To Cart",
"event_property":"Name",
"event_value":"sun glasses",
"_version_":1617202784870858752,
"location_str":["zzzz"]
},
{
"id":"5",
"email":"xxxxxx@gmail.com",
"gender":"M",
"location":["kkkkk"],
"created":123464,
"event_name":"Product Clicked",
"event_property":"Category",
"event_value":"Contact Lens",
"_version_":1617202784871907328,
"location_str":["lllll"]
}
]
solr
solr
edited yesterday
Abhijit Bashetti
4,21652033
4,21652033
asked 2 days ago
user3539626
1913
1913
So what's your query? Are you using grouping already? Thegroup.ngroups
parameter tells Solr to include the total group count in the result set in that case.
– MatsLindh
yesterday
add a comment |
So what's your query? Are you using grouping already? Thegroup.ngroups
parameter tells Solr to include the total group count in the result set in that case.
– MatsLindh
yesterday
So what's your query? Are you using grouping already? The
group.ngroups
parameter tells Solr to include the total group count in the result set in that case.– MatsLindh
yesterday
So what's your query? Are you using grouping already? The
group.ngroups
parameter tells Solr to include the total group count in the result set in that case.– MatsLindh
yesterday
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53372530%2fhow-to-do-pagination-with-grouping-in-solr-search%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
So what's your query? Are you using grouping already? The
group.ngroups
parameter tells Solr to include the total group count in the result set in that case.– MatsLindh
yesterday