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 shamik <sh...@gmail.com> on 2014/03/14 23:22:20 UTC
CollapsingQParserPlugin returning different result set
Hi,
I recently upgraded to 4.7, with the aim of replacing group queries with
CollapsingQParserPlugin. As I'm comparing results between the two APIs,
CollapsingQParserPlugin seems to be way off, in terms of relevancy and
result count. Here's an example :
*Group query*
http://test-dev.mydomain.com/solr/adskhelpportal?fq=language:(english)&wt=xml&rows=40&start=0&fq=(ContentGroup-local:"Learn
& Explore" OR ContentGroup-local:"Getting Started" OR
ContentGroup-local:"Troubleshooting")&fq=Product:"PRD"&q=line&sort=score
desc&group=true&group.field=ADSKDedup&group.ngroups=true&fl=title,ADSKDedup,score&debugQuery=true
/Top 4 results/
<lst name="grouped">
<lst name="ADSKDedup">
<int name="matches">14593</int>
<int name="ngroups">*13648*</int>
<arr name="groups">
<lst>
<str name="groupValue">fbfef4647e68c2300eba99028f2598a9</str>
<result name="doclist" numFound="1" start="0">
<doc>
<str
name="ADSKDedup">fbfef4647e68c2300eba99028f2598a9</str>
<arr name="title">
<str>LINE</str>
</arr>
<float name="score">8.517085</float>
</doc>
</result>
</lst>
<lst>
<str
name="groupValue">GUID-E8C1190C-A26C-484C-ADDD-DDF81666F69F</str>
<result name="doclist" numFound="3" start="0">
<doc>
<arr name="title">
<str>LINE (Command)</str>
</arr>
<str
name="ADSKDedup">GUID-E8C1190C-A26C-484C-ADDD-DDF81666F69F</str>
</doc>
</result>
</lst>
<lst>
<str
name="groupValue">GUID-695722CD-A131-48DB-9AB8-162F0832FE04</str>
<result name="doclist" numFound="4" start="0">
<doc>
<str
name="ADSKDedup">GUID-695722CD-A131-48DB-9AB8-162F0832FE04</str>
<arr name="title">
<str>About Controlling Extension Lines</str>
</arr>
<float name="score">5.1433907</float>
</doc>
</result>
</lst>
<lst>
<str
name="groupValue">GUID-9084DAC2-D5B7-4727-A443-205007A79440</str>
<result name="doclist" numFound="4" start="0">
<doc>
<arr name="title">
<str>About Controlling Dimension Lines</str>
</arr>
<str
name="ADSKDedup">GUID-9084DAC2-D5B7-4727-A443-205007A79440</str>
<float name="score">5.1361656</float>
</doc>
</result>
</lst>
*CollapsingQParserPlugin query*
http://test-dev.mydomain.com/solr/adskhelpportal?fq=language:(english)&wt=xml&rows=15&start=0&fq=(ContentGroup-local:"Learn
& Explore" OR ContentGroup-local:"Getting Started" OR
ContentGroup-local:"Troubleshooting")&fq=ProductLine:"PRD"&q=line&sort=score
desc&fq={!collapse field=ADSKDedup}&fl=title,ADSKDedup,score&debugQuery=true
/Top 4 results/
<result name="response" numFound="27142" start="0" maxScore="8.517085">
<doc>
<str name="ADSKDedup">fbfef4647e68c2300eba99028f2598a9</str>
<arr name="title">
<str>LINE</str>
</arr>
<float name="score">8.517085</float>
</doc>
<doc>
<str
name="ADSKDedup">GUID-57CDDB6C-B12B-46CE-B9C5-22EFC17258FF</str>
<arr name="title">
<str>To Draw Lines</str>
</arr>
<float name="score">6.276938</float>
</doc>
<doc>
<arr name="title">
<str>Draw Lines</str>
</arr>
<str name="ADSKDedup">98b4a0e39400f0a216ff51a89922ce82</str>
<float name="score">6.224089</float>
</doc>
<doc>
<str name="ADSKDedup">4e51abdc0e8d30e77069505d93c1d4d4</str>
<arr name="title">
<str>Lines Tab</str>
</arr>
<float name="score">6.210026</float>
</doc>
As you can see, the results are completely off, except for the first one.
Moreover, the number of results returned are different as well. Group query
has 13648 results which CollapsingQParserPlugin returns 27142, almost twice
the size.
I'm little baffled why the two APIs are returning different results for the
same query. Are they fundamentally different ?
Any pointers will be appreciated.
-Thanks,
Shamik
--
View this message in context: http://lucene.472066.n3.nabble.com/CollapsingQParserPlugin-returning-different-result-set-tp4123716.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: CollapsingQParserPlugin returning different result set
Posted by shamik <sh...@gmail.com>.
Joel,
I had a discussion with you earlier related ngroup inconsistent number
when you suggested to use the composite id to make sure that identical
(ADSKDedup) fields are available in the same shard.
Here's the thread -->
http://lucene.472066.n3.nabble.com/SolrCloud-Result-Grouping-vs-CollapsingQParserPlugin-td4111331.html
After making that change, the number of results returned matched with the
numfound parameter. I'm using the same setup after I upgraded to Solr 4.7
and started using CollapsingQParserPlugin API.
I take a quick look at some of the ids, the composite ids look to be
correct. One thing I've noticed is that the difference in relevance and
number seems to be directly proportional to the number of documents in the
result.
I'll try to create a small set of documents in a local Solr cloud and see if
I can replicate the problem. In that way, it'll be probably easy for you to
look.
Regards,
Shamik
--
View this message in context: http://lucene.472066.n3.nabble.com/CollapsingQParserPlugin-returning-different-result-set-tp4123716p4125290.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: CollapsingQParserPlugin returning different result set
Posted by Joel Bernstein <jo...@gmail.com>.
Hi Shamik,
I see that you are using distributed search. With the
CollapsingQParserPlugin you need to have all the documents that are in the
same group on the same shard.
Is that the way you have the documents indexed?
Joel
Joel Bernstein
Search Engineer at Heliosearch
On Mon, Mar 17, 2014 at 5:34 PM, shamik <sh...@gmail.com> wrote:
> Hi Joel, Thanks for taking a look into this. Here's the information you
> had
> requested.*ADSKDedup:*I've attached separate files for debug information
> for
> each query.Let me know if you need any information.Regards,Shamik
>
> CollapsingQParserPlugin_Query_Debug.txt
> <
> http://lucene.472066.n3.nabble.com/file/n4124968/CollapsingQParserPlugin_Query_Debug.txt
> >
>
> Group_Query_Debug.txt
> <http://lucene.472066.n3.nabble.com/file/n4124968/Group_Query_Debug.txt>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/CollapsingQParserPlugin-returning-different-result-set-tp4123716p4124968.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
Re: CollapsingQParserPlugin returning different result set
Posted by shamik <sh...@gmail.com>.
Hi Joel, Thanks for taking a look into this. Here's the information you had
requested.*ADSKDedup:*I've attached separate files for debug information for
each query.Let me know if you need any information.Regards,Shamik
CollapsingQParserPlugin_Query_Debug.txt
<http://lucene.472066.n3.nabble.com/file/n4124968/CollapsingQParserPlugin_Query_Debug.txt>
Group_Query_Debug.txt
<http://lucene.472066.n3.nabble.com/file/n4124968/Group_Query_Debug.txt>
--
View this message in context: http://lucene.472066.n3.nabble.com/CollapsingQParserPlugin-returning-different-result-set-tp4123716p4124968.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: CollapsingQParserPlugin returning different result set
Posted by Joel Bernstein <jo...@gmail.com>.
Hi Shamik,
You should be seeing the same result counts with grouping and the
CollapsingQParserPlugin, unless there are null values in the collapse
field. Let's see if we can figure out what the issue is.
Can you post the schema.xml field type definition for the ADSKDedup field?
Also can you post the full debug output for both queries?
Joel
Joel Bernstein
Search Engineer at Heliosearch
On Fri, Mar 14, 2014 at 6:22 PM, shamik <sh...@gmail.com> wrote:
> Hi,
>
> I recently upgraded to 4.7, with the aim of replacing group queries with
> CollapsingQParserPlugin. As I'm comparing results between the two APIs,
> CollapsingQParserPlugin seems to be way off, in terms of relevancy and
> result count. Here's an example :
>
> *Group query*
>
> http://test-dev.mydomain.com/solr/adskhelpportal?fq=language:(english)&wt=xml&rows=40&start=0&fq=(ContentGroup-local
> :"Learn
> & Explore" OR ContentGroup-local:"Getting Started" OR
> ContentGroup-local:"Troubleshooting")&fq=Product:"PRD"&q=line&sort=score
>
> desc&group=true&group.field=ADSKDedup&group.ngroups=true&fl=title,ADSKDedup,score&debugQuery=true
>
> /Top 4 results/
> <lst name="grouped">
> <lst name="ADSKDedup">
> <int name="matches">14593</int>
> <int name="ngroups">*13648*</int>
> <arr name="groups">
> <lst>
> <str
> name="groupValue">fbfef4647e68c2300eba99028f2598a9</str>
> <result name="doclist" numFound="1" start="0">
> <doc>
> <str
> name="ADSKDedup">fbfef4647e68c2300eba99028f2598a9</str>
> <arr name="title">
> <str>LINE</str>
> </arr>
> <float name="score">8.517085</float>
> </doc>
> </result>
> </lst>
> <lst>
> <str
> name="groupValue">GUID-E8C1190C-A26C-484C-ADDD-DDF81666F69F</str>
> <result name="doclist" numFound="3" start="0">
> <doc>
> <arr name="title">
> <str>LINE (Command)</str>
> </arr>
> <str
> name="ADSKDedup">GUID-E8C1190C-A26C-484C-ADDD-DDF81666F69F</str>
> </doc>
> </result>
> </lst>
> <lst>
> <str
> name="groupValue">GUID-695722CD-A131-48DB-9AB8-162F0832FE04</str>
> <result name="doclist" numFound="4" start="0">
> <doc>
> <str
> name="ADSKDedup">GUID-695722CD-A131-48DB-9AB8-162F0832FE04</str>
> <arr name="title">
> <str>About Controlling Extension Lines</str>
> </arr>
> <float name="score">5.1433907</float>
> </doc>
> </result>
> </lst>
> <lst>
> <str
> name="groupValue">GUID-9084DAC2-D5B7-4727-A443-205007A79440</str>
> <result name="doclist" numFound="4" start="0">
> <doc>
> <arr name="title">
> <str>About Controlling Dimension Lines</str>
> </arr>
> <str
> name="ADSKDedup">GUID-9084DAC2-D5B7-4727-A443-205007A79440</str>
> <float name="score">5.1361656</float>
> </doc>
> </result>
> </lst>
>
>
> *CollapsingQParserPlugin query*
>
>
> http://test-dev.mydomain.com/solr/adskhelpportal?fq=language:(english)&wt=xml&rows=15&start=0&fq=(ContentGroup-local
> :"Learn
> & Explore" OR ContentGroup-local:"Getting Started" OR
>
> ContentGroup-local:"Troubleshooting")&fq=ProductLine:"PRD"&q=line&sort=score
> desc&fq={!collapse
> field=ADSKDedup}&fl=title,ADSKDedup,score&debugQuery=true
>
> /Top 4 results/
> <result name="response" numFound="27142" start="0" maxScore="8.517085">
> <doc>
> <str name="ADSKDedup">fbfef4647e68c2300eba99028f2598a9</str>
> <arr name="title">
> <str>LINE</str>
> </arr>
> <float name="score">8.517085</float>
> </doc>
> <doc>
> <str
> name="ADSKDedup">GUID-57CDDB6C-B12B-46CE-B9C5-22EFC17258FF</str>
> <arr name="title">
> <str>To Draw Lines</str>
> </arr>
> <float name="score">6.276938</float>
> </doc>
> <doc>
> <arr name="title">
> <str>Draw Lines</str>
> </arr>
> <str name="ADSKDedup">98b4a0e39400f0a216ff51a89922ce82</str>
> <float name="score">6.224089</float>
> </doc>
> <doc>
> <str name="ADSKDedup">4e51abdc0e8d30e77069505d93c1d4d4</str>
> <arr name="title">
> <str>Lines Tab</str>
> </arr>
> <float name="score">6.210026</float>
> </doc>
>
> As you can see, the results are completely off, except for the first one.
> Moreover, the number of results returned are different as well. Group query
> has 13648 results which CollapsingQParserPlugin returns 27142, almost twice
> the size.
>
> I'm little baffled why the two APIs are returning different results for the
> same query. Are they fundamentally different ?
>
> Any pointers will be appreciated.
>
> -Thanks,
> Shamik
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/CollapsingQParserPlugin-returning-different-result-set-tp4123716.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>