Thanks Alexandre, that does sound related. I wouldn't imagine the
discrepancy would be that much, but I also realized that related items
aren't grouped on the same shard. This may be why my grouped counts are
off.

I will do some manual verification of the counts.

On Mon, Sep 5, 2016 at 12:22 PM, Alexandre Rafalovitch <arafa...@gmail.com>
wrote:

> Perhaps https://issues.apache.org/jira/browse/SOLR-7452 ?
> ----
> Newsletter and resources for Solr beginners and intermediates:
> http://www.solr-start.com/
>
>
> On 5 September 2016 at 23:07, Nick Vasilyev <nick.vasily...@gmail.com>
> wrote:
> > Hi, I need to get the number of distinct values of a field and I am
> getting
> > different counts between the json.facet interface and group.ngroups. Here
> > are the two queries:
> >
> > {'q': '*:*',
> >  'rows': 0,
> >  'json.facet': '{'mfr': "unique('mfr')"}'
> > })
> >
> > This brings up around 6,000 in the mfr field.
> >
> > However, if I run the following query, I get around 22,000:
> > {'q': '*:*',
> >  'rows': 0,
> >  'group': 'true',
> >  'group.ngroups': 'true',
> >  'group.field': 'mfr' }
> >
> > I am running solr 6.1.0 with 4 shards, I ran through some estimates and
> it
> > looks like each shard has around 6k manufacturers. Does anyone have any
> > ideas why this is happening?
> >
> > Thanks
>

Reply via email to