I have a problem while searching with Solr a phrase which has stopwords. Solr send result with stopword and this is not my expected output.
I added a word "test" in stopwords.txt
file.
In schema.xml
file, I have the field like
<field name="searchword" type="text" indexed="true" stored="true" />
I indexed some data, then tried to search in solr browser window as follows: searchword:"test" and I didn't get result. Then again I gave a phrase like searchword:"test data" and I got the result. How to avoid such scenario? If it contains stop word Solr should not give any result. How to stop the result in solr, when phrase containing a stopword?
The following is the fieldType I'm using:
<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.CommonGramsFilterFactory" words="stopwords.txt" ignoreCase="true"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory" />
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" type="phrase"/>
</analyzer>
</fieldType>
I need solution for Solr doesn't provided any result while I give phrase that contains the stopword (test)