Hi All, 

I am trying to restrict facets in solr response, by setting facet.mincount =
1, which does not work as the request and response are shown below: 

REQUEST:
http://localhost:8983/solr/select/?q=*%3A*&version=2.2&rows=0&start=0&indent=on&facet=true&facet.field=Instrument&facet.field=Location&facet.mincount=9

RESPONSE: 
<response> 
− 
<lst name="responseHeader"> 
<int name="status">0</int> 
<int name="QTime">1</int> 
− 
<lst name="params"> 
<str name="facet">true</str> 
<str name="indent">on</str> 
<str name="start">0</str> 
<str name="q">*:*</str> 
− 
<arr name="facet.field"> 
<str>Instrument</str> 
<str>Location</str> 
</arr> 
<str name="facet.minCount">9</str> 
<str name="version">2.2</str> 
<str name="rows">0</str> 
</lst> 
</lst> 
<result name="response" numFound="188" start="0"/> 
− 
<lst name="facet_counts"> 
<lst name="facet_queries"/> 
− 
<lst name="facet_fields"> 
<lst name="Instrument"/> 
− 
<lst name="Location"> 
<int name="Camden, New Jersey [unconfirmed]">118</int> 
<int name="Philadelphia, Pennsylvania [unconfirmed]">7</int> 
</lst> 
</lst> 
<lst name="facet_dates"/> 
</lst> 
</response> 

As we can see from the response that Instrument facet which has zero number
of distinct values, is included in the response. Also facet "Philadelphia,
Pennsylvania [unconfirmed]" which has count less than mincount (9) is
included in the response. 

I also tried Instrument.facet.mincount=1 but still I see Instrument facet in
the response. 

Please let me know if my understanding of mincount is different than what it
is intended to do, OR if I am doing something which is not correct. 

Regards, 
Umesh
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-does-not-honor-facet-mincount-and-field-facet-mincount-tp746499p746499.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to