You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Md. Mazharul Anwar" <ma...@seekasia.com> on 2015/08/17 13:14:45 UTC
Global pagination on grouped result doesn't work.
Hello,
My Goal: Search solr and group the result based on a field , paginate through the grouped result.
The query I used: group=true&group.field=customer_company_name&group.ngroups=true
I get a result set of:
{
*
responseHeader:
{
*
status: 0,
*
QTime: 20,
*
params:
{
*
group.ngroups: "true",
*
indent: "true",
*
q: "customer_company_name_lc:com*",
*
group.field: "customer_company_name",
*
group: "true",
*
wt: "json"
}
},
*
grouped:
{
*
customer_company_name:
{
*
matches: 565,
*
ngroups: 352,
*
groups:
[
*
{ ...
So I presume I can paginate through the groups by using &start=300&rows=60 ? Based on the total ngroups are 352, I should get back a json with 52 docs. However, when I do that myresult seems to be returning with 0 docs. An empty doc block. Like this:
{
*
responseHeader:
{
*
status: 0,
*
QTime: 9,
*
params:
{
*
group.ngroups: "true",
*
indent: "true",
*
start: "300",
*
q: "customer_company_name_lc:com*",
*
group.field: "customer_company_name",
*
group: "true",
*
wt: "json",
*
rows: "2"
}
},
*
grouped:
{
*
customer_company_name:
{
*
matches: 565,
*
ngroups: 352,
*
groups: [ ]
}
}
}
May I know what I am doing wrong or should I look at the problem from a different point of view ?
Thanks.
Maz