Hi Erick, 

Thanks for the reply. 

The query: 
  
http://localhost:8983/solr/db/select?indent=on&version=2.2&q=CITY:MILTON&fq=&start=0&rows=10&fl=*&wt=&explainOther=&hl.fl=&group=true&group.field=ID&group.ngroups=true&group.truncate=true&debugQuery=on

yields this in the debug section: 

<lst name="debug"><str name="rawquerystring">CITY:MILTON</str>
  <str name="querystring">CITY:MILTON</str>
  <str name="parsedquery">CITY:MILTON</str>
  <str name="parsedquery_toString">CITY:MILTON</str>
  <str name="QParser">LuceneQParser</str>

in the explain section. There is no information about grouping. 

Second query: 

http://localhost:8983/solr/db/select?indent=on&version=2.2&q=*&fq=&start=0&rows=10&fl=*&wt=&explainOther=&hl.fl=&group=true&group.field=ID&group.truncate=true&facet=true&facet.field=CITY&facet.missing=true&group.ngroups=true&debugQuery=on

yields this in the debug section: 

<lst name="debug">
  <str name="rawquerystring">*</str>
  <str name="querystring">*</str>
  <str name="parsedquery">ID:*</str>
  <str name="parsedquery_toString">ID:*</str>
  <str name="QParser">LuceneQParser</str>

To be honest, these do not tell me too much. I would like to see some
information about the grouping, since I believe this is where I am missing
something. 

In the mean time, I have combined the two queries above, hoping to make some
sense out of the results. The following query filters all the entries with
the city name "MILTON" and groups together the ones with the same ID. Also,
the query facets the entries on city, grouping the ones with the same ID. So
the results numbers refer to the number of groups. 

http://localhost:8983/solr/db/select?indent=on&version=2.2&q=*&fq={!tag=dt}CITY:MILTON&start=0&rows=10&fl=*&wt=&explainOther=&hl.fl=&group=true&group.field=ID&group.truncate=true&facet=true&facet.field={!ex=dt}CITY&facet.missing=true&group.ngroups=true&debugQuery=on
 

yields the same (for me perplexing) results: 

<lst name="grouped">
  <lst name="ID">
  <int name="matches">284</int>
  <int name="ngroups">134</int>

(i.e.: fq says: 134 groups with CITY:MILTON) 
... 

<lst name="facet_counts">
  <lst name="facet_queries"/>
  <lst name="facet_fields">
       ... 
  <int name="MILTON">103</int>

(i.e.: faceted search says: 103 groups with CITY:MILTON) 

I really believe that these different results have something to do with the
grouping that Solr makes, but I do not know how to dig into this. 

Thank you and best regards, 
Tudor

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Query-results-vs-facets-results-tp3995079p3995152.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to