Hi Jack,

The autoGeneratePhraseQueries="true" for the text field type will make it
take as a phrase every time right. I want it to take it as a phrase only
when given within double quotes and otherwise not(i.e if the input is
fast-five , search for fast,five,fast five,etc). For now i separated the
analyzers as you mentioned and removed all but one from query time.

 <fieldType name="text_general_Title" class="solr.TextField"
positionIncrementGap="100" autoGeneratePhraseQueries="false">
      <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true" />
                <filter class="solr.WordDelimiterFilterFactory" 
generateWordParts="1"
generateNumberParts="1" catenateWords="1" catenateNumbers="1"
catenateAll="0" splitOnCaseChange="0" splitOnNumerics="0"
preserveOriginal="1"/>
       <filter class="solr.LowerCaseFilterFactory"/>
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true" />
                <filter class="solr.WordDelimiterFilterFactory" 
preserveOriginal="0"/>          
        <filter class="solr.LowerCaseFilterFactory"/>
      </analyzer>
    </fieldType>

i get the query passed as the following if i give the search strimg as
"fast-five" within quotes.

<str name="rawquerystring">(((titleName:"fast-five")^20 OR
(akaName:"fast-five")^10))</str>
<str name="querystring">(((titleName:"fast-five")^20 OR
(akaName:"fast-five")^10))</str>
<str name="parsedquery">(+(PhraseQuery(titleName:"fast five"^20.0)
PhraseQuery(akaName:"fast five"^10.0)))/no_coord</str>
<str name="parsedquery_toString">+(titleName:"fast five"^20.0 akaName:"fast
five"^10.0)</str>

Why si the hyphen getting removed? I have no clue.




-----
Thanks,
Kashish
--
View this message in context: 
http://lucene.472066.n3.nabble.com/Not-allowing-exact-match-with-WordDelimiterFilterFactory-tp4133193p4133235.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to