You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by Ilya Zavorin <iz...@caci.com> on 2012/04/30 20:25:39 UTC

are Lucene indexing and search components thread-safe?

Hi All,

I am looking for a definitive source on which Lucene core components involved in indexing and search are thread safe. I did some google searches and found discussions of this here and there but they don't give me a complete picture and are sometimes even contradictory. I am currently using version 3.4 so is there a source of info on this topic for this version?

Thanks much, 


Ilya Zavorin




RE: are Lucene indexing and search components thread-safe?

Posted by Ilya Zavorin <iz...@caci.com>.
Simon,

Below is the list of all Lucene packages that I import in my code. Any of these are not thread safe?

org.apache.lucene.analysis.Analyzer;
org.apache.lucene.analysis.miscellaneous.PatternAnalyzer;
org.apache.lucene.analysis.PerFieldAnalyzerWrapper;
org.apache.lucene.analysis.standard.StandardAnalyzer;
org.apache.lucene.analysis.WordlistLoader;
org.apache.lucene.analysis.XX.ArabicAnalyzer;
org.apache.lucene.document.Document;
org.apache.lucene.document.Field;
org.apache.lucene.index.FieldInfo.IndexOptions;
org.apache.lucene.index.IndexReader;
org.apache.lucene.index.IndexWriter;
org.apache.lucene.index.IndexWriterConfig.OpenMode;
org.apache.lucene.index.IndexWriterConfig;
org.apache.lucene.index.Term;
org.apache.lucene.index.TermFreqVector;
org.apache.lucene.index.TermPositionVector;
org.apache.lucene.index.TermVectorOffsetInfo;
org.apache.lucene.queryParser.ParseException;
org.apache.lucene.queryParser.QueryParser;
org.apache.lucene.search.IndexSearcher;
org.apache.lucene.search.Query;
org.apache.lucene.search.ScoreDoc;
org.apache.lucene.search.TopDocs;
org.apache.lucene.store.Directory;
org.apache.lucene.store.FSDirectory;
org.apache.lucene.util.Version;

Thanks much,

Ilya


-----Original Message-----
From: Simon Willnauer [mailto:simon.willnauer@googlemail.com] 
Sent: Tuesday, May 01, 2012 6:44 AM
To: general@lucene.apache.org
Subject: Re: are Lucene indexing and search components thread-safe?

short answer is: yes! common search and indexing classes are threadsafe! IndexWriter & IndexReader (IndexSearcher) can be shared between threads. Any other particular class you are in doubt with?

simon

On Mon, Apr 30, 2012 at 8:25 PM, Ilya Zavorin <iz...@caci.com> wrote:
> Hi All,
>
> I am looking for a definitive source on which Lucene core components involved in indexing and search are thread safe. I did some google searches and found discussions of this here and there but they don't give me a complete picture and are sometimes even contradictory. I am currently using version 3.4 so is there a source of info on this topic for this version?
>
> Thanks much,
>
>
> Ilya Zavorin
>
>
>

Re: are Lucene indexing and search components thread-safe?

Posted by Simon Willnauer <si...@googlemail.com>.
short answer is: yes! common search and indexing classes are
threadsafe! IndexWriter & IndexReader (IndexSearcher) can be shared
between threads. Any other particular class you are in doubt with?

simon

On Mon, Apr 30, 2012 at 8:25 PM, Ilya Zavorin <iz...@caci.com> wrote:
> Hi All,
>
> I am looking for a definitive source on which Lucene core components involved in indexing and search are thread safe. I did some google searches and found discussions of this here and there but they don't give me a complete picture and are sometimes even contradictory. I am currently using version 3.4 so is there a source of info on this topic for this version?
>
> Thanks much,
>
>
> Ilya Zavorin
>
>
>