Hi,

I am using sharding (3 shards) with Zookeeper.

When I query a collection using "
*group=true&group.field=NAME&group.ngroups=true*" parameters, "*ngroups*" in
response is incorrect. However I am getting correct count in doclist array.

Ex: Below response contains 5 groups (Which is correct) but ngroups is 11.

{
   "responseHeader":{
      "status":0,
      "QTime":49,
      "params":{
         "group.ngroups":"true",
         "indent":"true",
         "start":"0",
         "q":"*:*",
         "group.field":"NAME",
         "group":"true",
         "wt":"json",
         "rows":"5"
      }
   },
   "grouped":{
      "NAME":{
         "matches":18,
         "ngroups":11,
         "groups":[
            {
               "groupValue":"A-SERIES",
               "doclist":{
                  "numFound":5,
                  "start":0,
                  "maxScore":1,
                  "docs":[
                     {
                        "NAME":"A-SERIES",
                        "_version_":1505559209034383400
                     }
                  ]
               }
            },
            {
               "groupValue":"B-SERIES",
               "doclist":{
                  "numFound":5,
                  "start":0,
                  "docs":[
                     {
                        "NAME":"B-SERIES",
                        "_version_":1505559209034383400
                     }
                  ]
               }
            },
            {
               "groupValue":"C-SERIES",
               "doclist":{
                  "numFound":1,
                  "start":0,
                  "docs":[
                     {
                        "NAME":"C-SERIES",
                        "_version_":1505559209034383400
                     }
                  ]
               }
            },
            {
               "groupValue":"D-SERIES",
               "doclist":{
                  "numFound":5,
                  "start":0,
                  "docs":[
                     {
                        "NAME":"D-SERIES",
                        "_version_":1505559209034383400
                     }
                  ]
               }
            },
            {
               "groupValue":"E-SERIES",
               "doclist":{
                  "numFound":3,
                  "start":0,
                  "maxScore":1,
                  "docs":[
                     {
                        "NAME":"E-SERIES",
                        "_version_":1505559209034383400
                     }
                  ]
               }
            }
         ]
      }
   }
}

I am facing same problem with Recip function to get latest record on some
date field when using sharding. It returns back records in wrong order.

Note: Same configuration works fine on single machine without sharding.

Please Help me to find solution.

Thanks.

Reply via email to