How would I handle a search for 21" or 3'. The " and ' symbols appear to get 
stripped away by Lucene before passing the query off to the analyzers.

Here is my analyzer in the schema.xml:

<analyzer type="query">
  <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" 
ignoreCase="true" expand="true"/>
  <filter class="solr.StopFilterFactory" ignoreCase="true" 
words="stopwords.txt"/>
  <filter class="solr.WordDelimiterFilterFactory" splitOnCaseChange="1" 
generateWordParts="1" generateNumberParts="1" catenateWords="0" 
catenateNumbers="0" catenateAll="0"/>
  <filter class="solr.LowerCaseFilterFactory"/>
  <filter class="solr.KStemFilterFactory" cacheSize="20000"/>
  <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>

I could certainly replace X" with X inch using regex in my custom request 
handler. But, I would rather not have synonyms in two separate places.

We are also using the DisjunctionMaxQueryParser to build the actual query from 
the front end.



      

Reply via email to