Michael Piefel
Michael Piefel

Reputation: 19968

Can I query the result of Solr stemming and stop-words?

We use Solr including language-dependent stemming and stop-words, all works fine.

However, we use search in other parts of the application as well where the documents are not in a Solr index. I’d like to filter out stop-words there as well. Is there any Solr query that returns its arguments with stop-words removed? Or in general, with filters applied?

Upvotes: 1

Views: 261

Answers (1)

cheffe
cheffe

Reputation: 9500

As written here in the SO question Get the result of an analysis as a JSON in SolR

You can configure the FieldAnalysisRequestHandler in your solrconfig.xml and ask him questions.

<requestHandler name="/analysis/field" class="solr.FieldAnalysisRequestHandler"/>

The request would look like this

http:// localhost:8989/solr/analysis/field?wt=json&analysis.fieldvalue=test+dog+cat&analysis.fieldtype=tokenization_stopwords

For more information have a look in the javadoc of the FieldAnalysisRequestHandler

Upvotes: 1

Related Questions