I have a problem finding with Solr a phrase that has temporary words. Solr sends the result using a stopwatch, and this is not my expected result.
I added the word "test" in the stopwords.txt file. In the schema.xml file, I have a type field
<field name="searchword" type="text" indexed="true" stored="true" />
I indexed some data, and then tried to search the solr browser window as follows: searchword: "test" , and I did not get the result. Then again, I gave a phrase like searchword: "test data" , and I got the result. How to avoid such a scenario? If it contains the word stop, Solr should not give any result. How to stop the result in solr when the phrase contains a stop?
The following is the type of fieldType that I am 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 a solution for Solr does not give any result, while I give a phrase that contains the word (test)
source share