On Tue, Jan 6, 2015 at 1:40 AM, Barry Coughlan wrote:
> Ideally the similarity field would not be mutable to indicate this, but I
> suppose this would make the constructors very awkward.
IndexSearcher(IndexReader, IndexSearcherConfig) wouldn't be all that
bad and we're at least already used to it
hetaphi.de
> -Original Message-
> From: Barry Coughlan [mailto:b.coughl...@gmail.com]
> Sent: Monday, January 05, 2015 3:40 PM
> To: java-user@lucene.apache.org; Ahmet Arslan
> Subject: Re: IndexSearcher.setSimilarity thread-safety
>
> Hi Ahmet,
>
> The IndexSearcher is "t
Monday, January 05, 2015 3:40 PM
> To: java-user@lucene.apache.org; Ahmet Arslan
> Subject: Re: IndexSearcher.setSimilarity thread-safety
>
> Hi Ahmet,
>
> The IndexSearcher is "thread-safe", it's just that the similarity field is
> shared
> between t
Hi Ahmet,
The IndexSearcher is "thread-safe", it's just that the similarity field is
shared between threads. I think that to most people it is implied that the
similarity is not thread-local, as this would be surprising behavior.
Ideally the similarity field would not be mutable to indicate this,
Hi Barry,
Thanks for chiming in. Then javadocs needs correction, right?
"multiple threads can call any of its methods, concurrently"
Ahmet
On Monday, January 5, 2015 3:28 PM, Barry Coughlan
wrote:
Just had a glance at the IndexSearcher code.
Changing the similarity would not cause any failu
Just had a glance at the IndexSearcher code.
Changing the similarity would not cause any failures. However the change
may not be immediately seen by all threads because the variable is
non-volatile (I'm open to correction on that...).
If you need multiple threads to have different Similarity impl
anyone?
On Thursday, December 25, 2014 4:42 PM, Ahmet Arslan
wrote:
Hi all,
Javadocs says "IndexSearcher instances are completely thread safe, meaning
multiple threads can call any of its
methods, concurrently"
Is this true for setSimilarity() method?
What happens when every thread uses
Hi all,
Javadocs says "IndexSearcher instances are completely thread safe, meaning
multiple threads can call any of its
methods, concurrently"
Is this true for setSimilarity() method?
What happens when every thread uses different similarity implementations?
Thanks,
Ahmet
-