Hi Kevin,

Find the component that's stripping your " and ' characters (WordDelimiterFF?) 
and make sure those characters are indexed first.  Then make sure the 
query-time analyzer keeps those tokens, too.  Finally, escape special 
characters (e.g. " in your example) in the query before passing it to Solr (I 
*think* Solr won't do it for you).

 
Otis--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



----- Original Message ----
> From: Kevin Osborn <[EMAIL PROTECTED]>
> To: Solr <solr-user@lucene.apache.org>
> Sent: Friday, September 19, 2008 7:18:15 PM
> Subject: SynonymFilter and inch/foot symbols
> 
> 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:
> 
> 
>   
>   
> ignoreCase="true" expand="true"/>
>   
> words="stopwords.txt"/>
>   
> generateWordParts="1" generateNumberParts="1" catenateWords="0" 
> catenateNumbers="0" catenateAll="0"/>
>   
>   
>   
> 
> 
> 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