You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by geeky2 <ge...@hotmail.com> on 2013/03/19 22:46:19 UTC
having trouble searching on EdgeNGramFilterFactory field with a
length < minGramSize
hello,
i am trying to debug the following query in the analyzer:
*+itemModelNoExactMatchStr:JVM1640CJ01 +plsBrandId:0432 +plsBrandDesc:ge*
the query is going against a field (plsBrandDesc) that is being indexed with
solr.EdgeNGramFilterFactory and a minGramSize of 3. i have included the
complete field definition below.
after doing some experimenting in the analyzer, i believe the query may be
failing because the queried value of "ge" is only two (2) characters long -
and the minimum gram size is three (3) characters.
for example - this query does work in the analyzer. it has a plsBrandDesc >
three characters and does return exactly one document:
+itemModelNoExactMatchStr:404 +plsBrandId:0431 *+plsBrandDesc:general*
i have tried overriding this behavior by using mm=2, but this does not seem
to work:
+itemModelNoExactMatchStr:JVM1640CJ01 +plsBrandId:0432 +plsBrandDesc:ge mm=2
am i misunderstanding how mm works - or am i getting the syntax for mm
incorrect?
thx
mark
<field name="plsBrandDesc" type="text_general_edge_ngram" indexed="true"
stored="true" multiValued="true"/>
<fieldType name="text_general_edge_ngram" class="solr.TextField"
positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true"/>
<filter class="solr.SynonymFilterFactory"
synonyms="synonyms_SHC.txt" ignoreCase="true" expand="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EdgeNGramFilterFactory" minGramSize="3"
maxGramSize="15" side="front"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
--
View this message in context: http://lucene.472066.n3.nabble.com/having-trouble-searching-on-EdgeNGramFilterFactory-field-with-a-length-minGramSize-tp4049107.html
Sent from the Solr - User mailing list archive at Nabble.com.