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 Dino Korah <dc...@gmail.com> on 2008/08/28 16:32:13 UTC

Analyzer at Query time

Hi All,
 
If I am to completely avoid the query parser and use the BooleanQuery along
with TermQuery, RangeQuery, PrefixQuery, PhraseQuery, etc, does the search
words still get to the Analyzer, before actually doing the real search?
 
Many thanks,
Dino
 

Re: Analyzer at Query time

Posted by Yonik Seeley <yo...@apache.org>.
On Thu, Aug 28, 2008 at 10:32 AM, Dino Korah <dc...@gmail.com> wrote:
> If I am to completely avoid the query parser and use the BooleanQuery along
> with TermQuery, RangeQuery, PrefixQuery, PhraseQuery, etc, does the search
> words still get to the Analyzer, before actually doing the real search?

Nope... the Analyzer is invoked by the QueryParser.

-Yonik

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


Re: Analyzer at Query time

Posted by Mark Miller <ma...@gmail.com>.
Dino Korah wrote:
> Hi All,
>  
> If I am to completely avoid the query parser and use the BooleanQuery along
> with TermQuery, RangeQuery, PrefixQuery, PhraseQuery, etc, does the search
> words still get to the Analyzer, before actually doing the real search?
>  
> Many thanks,
> Dino
>  
>
>   
Answer: no

The QueryParser applies the analyzer and builds a Query object tree 
based on the results. You will have to apply the analyzer yourself if 
your going to forgo QueryParser.

- Mark

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