Using analyzer while constructing Lucene queries

2009-01-12 Thread Rajesh parab
Hi, For proper results during searches, the recommendation is to use same analyzer for indexing and querying. We can achieve this by passing the same analyzer, which was used for indexing, to QueryParser to construct Lucene query and use this query while searching the index. The question is -

Re: Using analyzer while constructing Lucene queries

2009-01-13 Thread Ian Lea
If you are building queries manually, bypassing analysis, you just need to make sure that you know what you are doing. As a trivial example, if you are indexing with an analyzer that downcases everything then you need to pass lowercase terms to TermQuery. You can still use an analyzer where appro

Re: Using analyzer while constructing Lucene queries

2009-01-14 Thread Rajesh parab
tting it how I can use the same analyzer during searches is I am constructing queries manually. Regards, Rajesh --- On Tue, 1/13/09, Ian Lea wrote: > From: Ian Lea > Subject: Re: Using analyzer while constructing Lucene queries > To: java-user@lucene.apache.org, rajesh_para...@yahoo.co

Re: Using analyzer while constructing Lucene queries

2009-01-14 Thread Jack Stahl
ument as > it is indexed with token "play". > > What I am not really getting it how I can use the same analyzer during > searches is I am constructing queries manually. > > Regards, > Rajesh > > --- On Tue, 1/13/09, Ian Lea wrote: > > > From: Ian Lea >

Re: Using analyzer while constructing Lucene queries

2009-01-14 Thread Erick Erickson
I can use the same analyzer during > searches is I am constructing queries manually. > > Regards, > Rajesh > > --- On Tue, 1/13/09, Ian Lea wrote: > > > From: Ian Lea > > Subject: Re: Using analyzer while constructing Lucene queries > > To: java-user@lucene

Re: Using analyzer while constructing Lucene queries

2009-01-22 Thread Chris Hostetter
: 2> Construct your queries by yourself, by using TermQuery, : PhraseQuery etc. directly. There are no Analyzers used when : choosing this option. You have to know what the effects of the : Analyzer used during indexing had on the field you're searching : and be sure you're doing something compati