On Sep 15, 2011, at 3:43am, swiss knife wrote: > Simple question: I want to know how many distinct elements I have in a field > and these verify a query. Do you know if there's a way to do it today in 3.4. > > I saw SOLR-1814 and SOLR-2242. > > SOLR-1814 seems fairly easy to use. What do you think ? Thank you
If you turn on facets in your query (facet=true&facet.field=<field name>) then you'll get back all of the distinct values, though might have to play with other settings (e.g. facet.limit=-1) to get the results you need. -- Ken -------------------------- Ken Krugler +1 530-210-6378 http://bixolabs.com custom big data solutions & training Hadoop, Cascading, Mahout & Solr