Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which words appear the most common in an indexed field?

Tags:

solr

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.

like image 669
dotancohen Avatar asked Aug 28 '12 16:08

dotancohen


1 Answers

Use the luke request handler

http://wiki.apache.org/solr/LukeRequestHandler

example:

http://localhost:8983/solr/admin/luke?fl=Your_Indexed_Field&numTerms=500

like image 200
d whelan Avatar answered Oct 16 '22 21:10

d whelan