I am using NGramFilterFactory. My schema is as given below
<fieldType name="c_text" class="solr.TextField">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.NGramFilterFactory" minGramSize="1" maxGramSize="255"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
<field name="parentId" type="string" indexed="true" stored="true"/>
<field name="data_s" type="c_text" indexed="true" stored="true"/>
<field name="email" type="c_text" indexed="true" stored="true"/>
<field name="receivedDate" type="tdate" indexed="true" stored="true"/>
I want to make exatc phrase search like "Hello World" on data_s field but unable to make it. If i give
data_s:hello world
it returns all the records which have hello or world or both. If i give
data_s:"hello world"
it returns nothing.
How can i make a exact phrase search on this. I also require to make a search on partial text like "ello", that's why I am using NGramFilterFactory.
So my requirement is to make a search on exact phrase and partial text too.