Hi, I have misunderstanding about usage of SynonymGraphFilterFactory and 
WordDelimiterGraphFilterFactory. Can they be used together?

I have solr type configured in next way

<fieldtype name="fulltext_en" class="solr.TextField"
autoGeneratePhraseQueries="true">
  <analyzer type="index">
    <tokenizer class="solr.WhitespaceTokenizerFactory"/>
    <filter class="solr.WordDelimiterGraphFilterFactory"
            generateWordParts="1" generateNumberParts="1"
splitOnNumerics="1"
            catenateWords="1" catenateNumbers="1" catenateAll="0"
preserveOriginal="1" protected="protwords_en.txt"/>
    <filter class="solr.FlattenGraphFilterFactory"/>
  </analyzer>
  <analyzer type="query">
    <tokenizer class="solr.WhitespaceTokenizerFactory"/>
    <filter class="solr.WordDelimiterGraphFilterFactory"
            generateWordParts="1" generateNumberParts="1"
splitOnNumerics="1"
            catenateWords="0" catenateNumbers="0" catenateAll="0"
preserveOriginal="1" protected="protwords_en.txt"/>
    <filter class="solr.LowerCaseFilterFactory"/>
    <filter class="solr.SynonymGraphFilterFactory"
            synonyms="synonyms_en.txt" ignoreCase="true" expand="true"/>
  </analyzer>
</fieldtype>

So on query time it uses SynonymGraphFilterFactory after
WordDelimiterGraphFilterFactory.
Synonyms are configured in next way:
b=>b,boron
2=>ii,2

Query in solr analysis tool looks so. It is shown that terms after SGF have
positions 3 and 4. Is it correct? I thought that they should had 1 and 2
positions.

Now when a perform such query "my_field:b2"  then parsedQuery looks so
"my_field:b2 Synonym(my_field:2 my_field:ii)"
But for such query "my_field:2b"  parsedQuery will be such  "my_field:2b
Synonym(my_field:b my_field:boron)"

Synonym works only with last part of my query. 

Am I doing something wrong? Or maybe this filters are incompatible?

<http://lucene.472066.n3.nabble.com/file/t493764/queryAnalysis.png> 



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Reply via email to