Aditya
Aditya

Reputation: 41

Extracting key phrases from documents indexed in solr

I want to extract the key phrases from the documents indexed in solr and show those phrases as tags for the user.This should be performed after the query has been executed.

For eg: if i type a query India and I get the first 50 results on the page, I want to display the important phrases from these 50 documents to the user as tags (to do further filtering).

How do I extract key phrases from the text?

Upvotes: 1

Views: 538

Answers (1)

femtoRgon
femtoRgon

Reputation: 33351

I believe org.apache.lucene.search.highlight.Highlighter is what you are looking for.

An example showing it's use can be seen here: http://www.tinhtruong.me/2012/04/highlighting-text-with-lucene.html (among other places).

Upvotes: 1

Related Questions