How could I query Solr for the most common indexed words? For example, given these fields for each document:
- There’s a lady who’s sure all the glitters is gold.
- Gold is worth more than silver.
- The lady is wearing a gold bracelet.
I would like Solr to return to me, in any format, the following output:
- gold (3)
- lady (2)
- the (2) // Being a stop word this isn’t really necessary
- …
Thanks.
Use the luke request handler
http://wiki.apache.org/solr/LukeRequestHandler
example:
http://localhost:8983/solr/admin/luke?fl=Your_Indexed_Field&numTerms=500