lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message