lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Hendler <jonathan.hend...@gmail.com>
Subject Using Solr for term-completion with counts
Date Mon, 26 Oct 2009 21:06:38 GMT
Greetings all,

We're happily migrating our MySQL fulltext search to SOLR/faceted  
search.

We're doing a term suggest on a large text field and doing  
facet.sort=count. The numbers returned represent total times the term  
shows up - I'd like to have the numbers represent the total documents  
(unique ids) containing the term instead. Can I do this through a  
facet query or another param ? I didn't see this example on the wiki  
or the new book.

In other words to return Math(12 documents) instead of Math(93 times  
word shows up)
query=(+Ma*) 
&facet.prefix 
="Ma"&facet.field=large_index_of_text&facet.sort=count&facet.mincount=1

- Jonathan
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message