lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ganesh" <emailg...@yahoo.co.in>
Subject Re: Questions about analyzer
Date Mon, 09 Mar 2009 05:58:07 GMT
Mike in of his replies to the thread "Faceted search using Lucene", gave the 
following code review comment

   * You are creating a new Analyzer & QueryParser every time, also
     creating unnecessary garbage; instead, they should be created once
     & reused.

This made me to ask the below questions.

Based on the application default langauge, i need to pick analyzer. Few 
analyzers (Russian, French) are available in both Contrib and Snowball. 
Which is more reliable?

Reagrds
Ganesh


----- Original Message ----- 
From: "Erick Erickson" <erickerickson@gmail.com>
To: <java-user@lucene.apache.org>
Sent: Friday, March 06, 2009 6:47 PM
Subject: Re: Questions about analyzer


> See below
> On Fri, Mar 6, 2009 at 1:44 AM, Ganesh <emailgane@yahoo.co.in> wrote:
>
>> Hello all
>>
>> 1)
>> Which is best to use Snowball analyzer or Lucene contrib analyzer? There 
>> is
>> no inbuilt stop word list for Snowball analyzer?
>>
>
> What is the "Lucene contrib analyzer"? There are 12 of them......
> And regardless, the answer is "It depends" on what
> you're trying to accomplish, which you haven't stated.
>
> I don't know if there's a default set of stop words, but this
> seems like a pretty easy thing to test for yourself.
>
>
>>
>> 2)
>> Whether Analyzer and QueryParser are thread-free. They could created once
>> and use it in as many threads?
>>
> From the FAQ (
> http://wiki.apache.org/lucene-java/LuceneFAQ#head-42833b3bb259e10c64424a892a3f04840a187d80
> )
>
> Is the QueryParser thread-safe?
>
> No, it's not.
>
>
> I'm unsure about analyzers, but they are so lightweight I wouldn't
>
> go to the trouble of sharing them among threads just to be safe.
>
>
>
>>
>> 3)
>> I am using Snowball Analyzer to do index and search., When i search for
>> windows AND vista, QueryParser is adding AND as part of search, But i am
>> expecting something like +windows +vista.
>>
>
> How do you know this? Is the the result of query.toString? And is
> the "AND" *in your query* uppercase? One of the quirks of Lucene
> is that it requires 'and', 'or' and 'not' to be uppercase to be
> interpreted as you expect.
>
> Best
> Erick
>
>
>>
>> Regards
>> Ganesh
>> Send instant messages to your online friends 
>> http://in.messenger.yahoo.com
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
> 

Send instant messages to your online friends http://in.messenger.yahoo.com 

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


Mime
View raw message