You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Erik Hatcher <er...@ehatchersolutions.com> on 2005/10/01 12:07:59 UTC

Re: about lucene lock

On Sep 30, 2005, at 3:42 PM, haipeng du wrote:
> When I search the lucene, do I need to take care of Lucene lock? I  
> check the
> api of Lucene, it will call IndexReader.rewrite(). Does this one  
> need a lock
> for lucene index file?
> Thanks a lot.

No locking is used for searching.   There is no IndexReader.rewrite()  
method - you must be thinking of IndexSearcher.  That "rewrite"  
method does not write anything to the index, it is to re-format the  
Query in memory as a more primitive type of Query.  For example, a  
RangeQuery gets rewritten as a BooleanQuery OR'ing all matching terms  
as TermQuery's.

     Erik


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