You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Ravi <ra...@siti.com> on 2006/03/03 11:51:53 UTC

:using different analyzers for indexing and searching:

Hi ,

 

I am using Standard Analyzer with stop words when I am trying to index my
documents.. but when I want to support wildcard functionality it is not
working with Standard Analyzer since it ignores the Punctuation character
where * and ? are also part of Punctuations . So I want to use another
analyzer for searcher. If I do like this will I get my required result or
not.. Most importantly I would like to know is this a  good practice to have
two different analyzers for two operations or same analyzer..  

 

 

 

Thanks

 

Ravi Kumar Jaladanki


Re: :using different analyzers for indexing and searching:

Posted by Chris Hostetter <ho...@fucit.org>.
: I am using Standard Analyzer with stop words when I am trying to index my
: documents.. but when I want to support wildcard functionality it is not
: working with Standard Analyzer since it ignores the Punctuation character
: where * and ? are also part of Punctuations . So I want to use another
: analyzer for searcher. If I do like this will I get my required result or
: not.. Most importantly I would like to know is this a  good practice to have
: two different analyzers for two operations or same analyzer..

There are certainly legitimate cases where it makes sense to have
differnet analyzers at index/query time -- the best example being a
synonym filter -- but i don't think this is one of those cases.

when using Prefix and WIldCard queries, there isn't really any safe way to
analyze the text -- partly because of mid-token wildcards, but also
because how do you go about doing things like stemming a "prefix" if you
don't know what the full token is?

this is why the default QueryParser doesn't analyze tokens when it sees
that they are being used for either WildCard or Prefix queries.



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org