lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: about lucene lock
Date Sat, 01 Oct 2005 10:07:59 GMT

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


Mime
View raw message