Reputation: 125
I want to find out how many times the searched keyword repeated in each document. For Ex: search word: pharmacy related. This word may be repeated n no of times in all MATCHED documents, how to find out the COUNT per document? Please suggest me
Upvotes: 1
Views: 1623
Reputation: 5488
You can do that with Solr's functions:
termfreq(text,'pharmacy related')
The only condition for that is you need to index this field correctly! In case when you need to return count of phrases rather than single words, I would use ShingleFilterFactory
Upvotes: 2