I have a Solr Full Text field with the following settings...
<fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<charFilter class="solr.MappingCharFilterFactory" mapping="accents_en.txt"/>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_en.txt"/>
<filter class="solr.WordDelimiterGraphFilterFactory" catenateNumbers="1" generateNumberParts="1" protected="protwords_en.txt" splitOnCaseChange="0" generateWordParts="1" preserveOriginal="1" catenateAll="0" catenateWords="1"/>
<filter class="solr.LengthFilterFactory" min="1" max="100"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords_en.txt"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
<analyzer type="query">
<charFilter class="solr.MappingCharFilterFactory" mapping="accents_en.txt"/>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms_en.txt" expand="true" ignoreCase="true"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_en.txt"/>
<filter class="solr.WordDelimiterGraphFilterFactory" catenateNumbers="0" generateNumberParts="1" protected="protwords_en.txt" splitOnCaseChange="0" generateWordParts="1" preserveOriginal="1" catenateAll="0" catenateWords="0"/>
<filter class="solr.LengthFilterFactory" min="1" max="100"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords_en.txt"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldType>
When I search using quotes "cat fish" The document with "cats, fish," is returned in the response. But I want only the documents exactly matching "cat fish" with a space.
I tried to remove all of the tokenization except for "solr.WhitespaceTokenizerFactory" but it still did not work. Then I removed all of the filters and tokenizers and it didn't work as well.
<fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
</analyzer>
<analyzer type="query">
</analyzer>
</fieldType>
How do I make quote searches only return exact phrases?
This is the solr query i use in the solr Admin UI using Edismax...
select?defType=edismax&fl=tm_X3b_en_aggregated_field_title,tm_X3b_en_aggregated_field_title,tm_X3b_en_rendered_item&ps=0&q="cat%20fish"&qf=tm_X3b_en_rendered_item^1%20%20tm_X3b_und_rendered_item^1%20%20tm_X3b_en_aggregated_field^1%20%20tm_X3b_und_aggregated_field^1%20%20tm_X3b_zxx_aggregated_field^1%20%20tm_X3b_en_body^1%20%20tm_X3b_und_body^1%20%20tm_X3b_zxx_body^1&qs=0