I am using Apache Solr for indexing using DataImportHandler. The document structure is as follows:
id(long), title(text), abstract(text), pubDate(date)
I combined title and abstract filed fro text searching.My problem is when I query "title: utility" then it gives result as follows:
id, title
6, Financial Deal Insights Energy & Utilities December 2008
11,Residential utility retail strategies in an economic downturn
16,Financial Deal Insights: Energy & Utilities Review of 2008
41,Solar at the heart of utility corporate strategy
I want to search only "utility" but it gives result also for utilities... I also tried title:"utility" and title:utility~1 but it doesnt worked. I read about 'stemming' but I dont have any idea how to use it... please help me.. thanks..
This is cause of the PorterStemFilterFactory in your Text analysis.
<filter class="solr.PorterStemFilterFactory"/>
Stemmer would reduce the words to root and hence utility would match utilities as well.
Check if you need Stemmer for Searching, else you can remove it from your filter chain.
Else check for a less aggressive stemmer to fit your needs.