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 Modassar Ather <mo...@gmail.com> on 2016/05/02 12:23:48 UTC
Results of facet differs with change in facet.limit.
Hi,
I have a field f which is defined as follows on solr 5.x. It is 12 shard
cluster with no replica.
<fieldType name="string_dv" class="solr.StrField" sortMissingLast="true"
stored="false" indexed="false" docValues="true"/>
When I facet on this field with different facet.limit I get different facet
count.
E.g.
Query : text_field:term&facet.field=f&facet.limit=100
Result :
<int name="val1">1225</int>
<int name="val2">1082</int>
<int name="val3">1076</int>
Query : text_field:term&facet.field=f&facet.limit=200
<int name="val1">1366</int>
<int name="val2">1321</int>
<int name="val3">1315</int>
I am noticing lesser document in facets whereas the numFound during search
is more. Please refer to following query for details.
Query : text_field:term&facet.field=f
Result :
<int name="val1">1225</int>
<int name="val2">1082</int>
<int name="val3">1076</int>
Query : text_field:term AND f:val1
Result: numFound=1366
Kindly help me understand this behavior or let me know if it is an issue.
Thanks,
Modassar
Re: Results of facet differs with change in facet.limit.
Posted by Erick Erickson <er...@gmail.com>.
OK, this is strange on the face of it. Is there any chance you could
create a test case that fails? Even if it only fails a small percentage
of the time...
Best,
Erick
On Wed, May 4, 2016 at 3:02 AM, Modassar Ather <mo...@gmail.com> wrote:
> The "val1" is same for both the test with limit 100 and 200 so the
> following is true.
>
> limit=100
> <int name="foo">1225</int>
> <int name="bar">1082</int>
> <int name="zoo">1076</int>
>
> limit=200
> <int name="foo">1366</int>
> <int name="bar">1321</int>
> <int name="zoo">1315</int>
>
> This I have noticed irrespective of facet.limit too. Please refer to my
> previous mail for the example.
>
> Thanks,
> Modassar
>
> On Wed, May 4, 2016 at 3:01 PM, Toke Eskildsen <te...@statsbiblioteket.dk>
> wrote:
>
>> On Mon, 2016-05-02 at 15:53 +0530, Modassar Ather wrote:
>> > E.g.
>> > Query : text_field:term&facet.field=f&facet.limit=100
>> > Result :
>> > <int name="val1">1225</int>
>> > <int name="val2">1082</int>
>> > <int name="val3">1076</int>
>> >
>> > Query : text_field:term&facet.field=f&facet.limit=200
>> > <int name="val1">1366</int>
>> > <int name="val2">1321</int>
>> > <int name="val3">1315</int>
>>
>> Is the "val1" in your limit=100 test the same term as your "val1" in
>> your limit=200-test?
>>
>>
>> Or to phrase it another way: Do you have
>>
>> limit=100
>> <int name="foo">1225</int>
>> <int name="bar">1082</int>
>> <int name="zoo">1076</int>
>>
>> limit=200
>> <int name="foo">1366</int>
>> <int name="bar">1321</int>
>> <int name="zoo">1315</int>
>>
>>
>> or
>>
>> limit=100
>> <int name="foo">1225</int>
>> <int name="bar">1082</int>
>> <int name="zoo">1076</int>
>>
>> limit=200
>> <int name="baz">1366</int>
>> <int name="pli">1321</int>
>> <int name="osk">1315</int>
>>
>>
>> - Toke Eskildsen, State and University Library, Denmark
>>
>>
Re: Results of facet differs with change in facet.limit.
Posted by Modassar Ather <mo...@gmail.com>.
The "val1" is same for both the test with limit 100 and 200 so the
following is true.
limit=100
<int name="foo">1225</int>
<int name="bar">1082</int>
<int name="zoo">1076</int>
limit=200
<int name="foo">1366</int>
<int name="bar">1321</int>
<int name="zoo">1315</int>
This I have noticed irrespective of facet.limit too. Please refer to my
previous mail for the example.
Thanks,
Modassar
On Wed, May 4, 2016 at 3:01 PM, Toke Eskildsen <te...@statsbiblioteket.dk>
wrote:
> On Mon, 2016-05-02 at 15:53 +0530, Modassar Ather wrote:
> > E.g.
> > Query : text_field:term&facet.field=f&facet.limit=100
> > Result :
> > <int name="val1">1225</int>
> > <int name="val2">1082</int>
> > <int name="val3">1076</int>
> >
> > Query : text_field:term&facet.field=f&facet.limit=200
> > <int name="val1">1366</int>
> > <int name="val2">1321</int>
> > <int name="val3">1315</int>
>
> Is the "val1" in your limit=100 test the same term as your "val1" in
> your limit=200-test?
>
>
> Or to phrase it another way: Do you have
>
> limit=100
> <int name="foo">1225</int>
> <int name="bar">1082</int>
> <int name="zoo">1076</int>
>
> limit=200
> <int name="foo">1366</int>
> <int name="bar">1321</int>
> <int name="zoo">1315</int>
>
>
> or
>
> limit=100
> <int name="foo">1225</int>
> <int name="bar">1082</int>
> <int name="zoo">1076</int>
>
> limit=200
> <int name="baz">1366</int>
> <int name="pli">1321</int>
> <int name="osk">1315</int>
>
>
> - Toke Eskildsen, State and University Library, Denmark
>
>
Re: Results of facet differs with change in facet.limit.
Posted by Toke Eskildsen <te...@statsbiblioteket.dk>.
On Mon, 2016-05-02 at 15:53 +0530, Modassar Ather wrote:
> E.g.
> Query : text_field:term&facet.field=f&facet.limit=100
> Result :
> <int name="val1">1225</int>
> <int name="val2">1082</int>
> <int name="val3">1076</int>
>
> Query : text_field:term&facet.field=f&facet.limit=200
> <int name="val1">1366</int>
> <int name="val2">1321</int>
> <int name="val3">1315</int>
Is the "val1" in your limit=100 test the same term as your "val1" in
your limit=200-test?
Or to phrase it another way: Do you have
limit=100
<int name="foo">1225</int>
<int name="bar">1082</int>
<int name="zoo">1076</int>
limit=200
<int name="foo">1366</int>
<int name="bar">1321</int>
<int name="zoo">1315</int>
or
limit=100
<int name="foo">1225</int>
<int name="bar">1082</int>
<int name="zoo">1076</int>
limit=200
<int name="baz">1366</int>
<int name="pli">1321</int>
<int name="osk">1315</int>
- Toke Eskildsen, State and University Library, Denmark
Re: Results of facet differs with change in facet.limit.
Posted by Modassar Ather <mo...@gmail.com>.
Thanks Erick for your response.
I checked with distrib=false. I tried with a smaller result set.
*Search*
E.g. text_field:term AND f:val1
Number of matches : 49
*Facet:* (distrib=true)
text_field:term AND f:val1
*Result*
Shard1 :
<lst name="f">
<int name="val1">47</int>
*Facet: *(distrib=false)
text_field:term AND f:val1&distrib=false
*Result*
Shard1 :
<lst name="f">
<int name="val1">44</int>
Shard3 :
<lst name="f">
<int name="val1">2</int>
Shard8 :
<lst name="f">
<int name="val1">3</int>
All other shards out of 12 shows 0 count against val1. It seems that the
result of shard3 is not being added to the main result.
Kindly comment.
Best,
Modassar
On Wed, May 4, 2016 at 5:33 AM, Erick Erickson <er...@gmail.com>
wrote:
> Hmm, I'd be interested what you get if you restrict your
> queries to individual shards using &distrib=false. This
> will go to the individual shard you address and no others.
>
> Does the facet count change in those circumstances?
>
> Best,
> Erick
>
> On Tue, May 3, 2016 at 4:48 AM, Modassar Ather <mo...@gmail.com>
> wrote:
> > I tried to reproduce the same issue with a field of following type but
> > could not.
> > <fieldType name="string" class="solr.StrField" sortMissingLast="true"
> > stored="false" omitNorms="true"/>
> >
> > Please share your inputs.
> >
> > Best,
> > Modassar
> >
> > On Tue, May 3, 2016 at 10:32 AM, Modassar Ather <mo...@gmail.com>
> > wrote:
> >
> >> Hi,
> >>
> >> Kindly share your inputs on this issue.
> >>
> >> Thanks,
> >> Modassar
> >>
> >> On Mon, May 2, 2016 at 3:53 PM, Modassar Ather <mo...@gmail.com>
> >> wrote:
> >>
> >>> Hi,
> >>>
> >>> I have a field f which is defined as follows on solr 5.x. It is 12
> shard
> >>> cluster with no replica.
> >>>
> >>> <fieldType name="string_dv" class="solr.StrField"
> sortMissingLast="true"
> >>> stored="false" indexed="false" docValues="true"/>
> >>>
> >>> When I facet on this field with different facet.limit I get different
> >>> facet count.
> >>>
> >>> E.g.
> >>> Query : text_field:term&facet.field=f&facet.limit=100
> >>> Result :
> >>> <int name="val1">1225</int>
> >>> <int name="val2">1082</int>
> >>> <int name="val3">1076</int>
> >>>
> >>> Query : text_field:term&facet.field=f&facet.limit=200
> >>> <int name="val1">1366</int>
> >>> <int name="val2">1321</int>
> >>> <int name="val3">1315</int>
> >>>
> >>> I am noticing lesser document in facets whereas the numFound during
> >>> search is more. Please refer to following query for details.
> >>>
> >>> Query : text_field:term&facet.field=f
> >>> Result :
> >>> <int name="val1">1225</int>
> >>> <int name="val2">1082</int>
> >>> <int name="val3">1076</int>
> >>>
> >>> Query : text_field:term AND f:val1
> >>> Result: numFound=1366
> >>>
> >>> Kindly help me understand this behavior or let me know if it is an
> issue.
> >>>
> >>> Thanks,
> >>> Modassar
> >>>
> >>
> >>
>
Re: Results of facet differs with change in facet.limit.
Posted by Erick Erickson <er...@gmail.com>.
Hmm, I'd be interested what you get if you restrict your
queries to individual shards using &distrib=false. This
will go to the individual shard you address and no others.
Does the facet count change in those circumstances?
Best,
Erick
On Tue, May 3, 2016 at 4:48 AM, Modassar Ather <mo...@gmail.com> wrote:
> I tried to reproduce the same issue with a field of following type but
> could not.
> <fieldType name="string" class="solr.StrField" sortMissingLast="true"
> stored="false" omitNorms="true"/>
>
> Please share your inputs.
>
> Best,
> Modassar
>
> On Tue, May 3, 2016 at 10:32 AM, Modassar Ather <mo...@gmail.com>
> wrote:
>
>> Hi,
>>
>> Kindly share your inputs on this issue.
>>
>> Thanks,
>> Modassar
>>
>> On Mon, May 2, 2016 at 3:53 PM, Modassar Ather <mo...@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I have a field f which is defined as follows on solr 5.x. It is 12 shard
>>> cluster with no replica.
>>>
>>> <fieldType name="string_dv" class="solr.StrField" sortMissingLast="true"
>>> stored="false" indexed="false" docValues="true"/>
>>>
>>> When I facet on this field with different facet.limit I get different
>>> facet count.
>>>
>>> E.g.
>>> Query : text_field:term&facet.field=f&facet.limit=100
>>> Result :
>>> <int name="val1">1225</int>
>>> <int name="val2">1082</int>
>>> <int name="val3">1076</int>
>>>
>>> Query : text_field:term&facet.field=f&facet.limit=200
>>> <int name="val1">1366</int>
>>> <int name="val2">1321</int>
>>> <int name="val3">1315</int>
>>>
>>> I am noticing lesser document in facets whereas the numFound during
>>> search is more. Please refer to following query for details.
>>>
>>> Query : text_field:term&facet.field=f
>>> Result :
>>> <int name="val1">1225</int>
>>> <int name="val2">1082</int>
>>> <int name="val3">1076</int>
>>>
>>> Query : text_field:term AND f:val1
>>> Result: numFound=1366
>>>
>>> Kindly help me understand this behavior or let me know if it is an issue.
>>>
>>> Thanks,
>>> Modassar
>>>
>>
>>
Re: Results of facet differs with change in facet.limit.
Posted by Modassar Ather <mo...@gmail.com>.
I tried to reproduce the same issue with a field of following type but
could not.
<fieldType name="string" class="solr.StrField" sortMissingLast="true"
stored="false" omitNorms="true"/>
Please share your inputs.
Best,
Modassar
On Tue, May 3, 2016 at 10:32 AM, Modassar Ather <mo...@gmail.com>
wrote:
> Hi,
>
> Kindly share your inputs on this issue.
>
> Thanks,
> Modassar
>
> On Mon, May 2, 2016 at 3:53 PM, Modassar Ather <mo...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I have a field f which is defined as follows on solr 5.x. It is 12 shard
>> cluster with no replica.
>>
>> <fieldType name="string_dv" class="solr.StrField" sortMissingLast="true"
>> stored="false" indexed="false" docValues="true"/>
>>
>> When I facet on this field with different facet.limit I get different
>> facet count.
>>
>> E.g.
>> Query : text_field:term&facet.field=f&facet.limit=100
>> Result :
>> <int name="val1">1225</int>
>> <int name="val2">1082</int>
>> <int name="val3">1076</int>
>>
>> Query : text_field:term&facet.field=f&facet.limit=200
>> <int name="val1">1366</int>
>> <int name="val2">1321</int>
>> <int name="val3">1315</int>
>>
>> I am noticing lesser document in facets whereas the numFound during
>> search is more. Please refer to following query for details.
>>
>> Query : text_field:term&facet.field=f
>> Result :
>> <int name="val1">1225</int>
>> <int name="val2">1082</int>
>> <int name="val3">1076</int>
>>
>> Query : text_field:term AND f:val1
>> Result: numFound=1366
>>
>> Kindly help me understand this behavior or let me know if it is an issue.
>>
>> Thanks,
>> Modassar
>>
>
>
Re: Results of facet differs with change in facet.limit.
Posted by Modassar Ather <mo...@gmail.com>.
Hi,
Kindly share your inputs on this issue.
Thanks,
Modassar
On Mon, May 2, 2016 at 3:53 PM, Modassar Ather <mo...@gmail.com>
wrote:
> Hi,
>
> I have a field f which is defined as follows on solr 5.x. It is 12 shard
> cluster with no replica.
>
> <fieldType name="string_dv" class="solr.StrField" sortMissingLast="true"
> stored="false" indexed="false" docValues="true"/>
>
> When I facet on this field with different facet.limit I get different
> facet count.
>
> E.g.
> Query : text_field:term&facet.field=f&facet.limit=100
> Result :
> <int name="val1">1225</int>
> <int name="val2">1082</int>
> <int name="val3">1076</int>
>
> Query : text_field:term&facet.field=f&facet.limit=200
> <int name="val1">1366</int>
> <int name="val2">1321</int>
> <int name="val3">1315</int>
>
> I am noticing lesser document in facets whereas the numFound during search
> is more. Please refer to following query for details.
>
> Query : text_field:term&facet.field=f
> Result :
> <int name="val1">1225</int>
> <int name="val2">1082</int>
> <int name="val3">1076</int>
>
> Query : text_field:term AND f:val1
> Result: numFound=1366
>
> Kindly help me understand this behavior or let me know if it is an issue.
>
> Thanks,
> Modassar
>