I tried solving issue like
<fieldType name="text_general2" class="solr.TextField"
positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.ShingleFilterFactory" maxShingleSize="2"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.PatternTokenizerFactory"
pattern="(.*)(HDFC\sLTD)(.*)" group="2"/>
<filter class="solr.TrimFilterFactory" />
</analyzer>
</fieldType>
It works for query like CHQ PAID-INWARD TRANHDFC LTD
000000036529
But if HDFC LTD is preceding with underscore(-) or any digit (0-9) it
matches with HDFC MF also
Please let me know why...
--
View this message in context:
http://lucene.472066.n3.nabble.com/Solr-pattern-tokenizer-tp4183421p4185270.html
Sent from the Solr - User mailing list archive at Nabble.com.