Example what I need:
Query:
Hi likes *this kind of winter *weather
Document shingle field:
They like *this kind of winter *with many sunny days
So I need to match *this kind of winter *.
What tokenisers and filters and maybe something else should be used for this
kind of match.
I tried for example this one, but it matches the entire query to a shingle:
<fieldType name="text_shingle" class="solr.TextField"
positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.ShingleFilterFactory" minShingleSize="2"
maxShingleSize="5"
outputUnigrams="false" outputUnigramsIfNoShingles="true"
tokenSeparator=" "/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.ShingleFilterFactory" minShingleSize="2"
maxShingleSize="5"
outputUnigrams="false" outputUnigramsIfNoShingles="true"
tokenSeparator=" "/>
</analyzer>
</fieldType>
--
View this message in context:
http://lucene.472066.n3.nabble.com/Help-on-matching-a-shingle-in-a-query-to-a-shingle-in-the-document-tp4170852.html
Sent from the Solr - User mailing list archive at Nabble.com.