I am having solr 6.6 installation. I am trying to look up documents having search term with a number e.g. q=testterm 2
The field on which I am trying to run search has following definition:
<field name="text" type="text_general" indexed="true" stored="false" multiValued="true"/>
Definition for data type text_general is:
<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<charFilter class="solr.PatternReplaceCharFilterFactory" pattern="([^A-Za-z0-9 ])" replacement=""/>
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" preserveOriginal="1"/>
<filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="50"/>
<filter class="solr.ReverseStringFilterFactory"/>
<filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="50"/>
<filter class="solr.ReverseStringFilterFactory"/>
</analyzer>
<analyzer type="query">
<charFilter class="solr.PatternReplaceCharFilterFactory" pattern="([^A-Za-z0-9 ])" replacement=""/>
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" preserveOriginal="1"/>
</analyzer>
</fieldType>
value to field text defined earlier is populated using copyfield.
The problem happens when I use search terms having number (as mentioned above) no docs are returned. Is there anyway to configure solr so that search term having number returns docs (Note: fields such as title already have value Testterm 2
and this is copied to text using copyfield)