lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Muir <rcm...@gmail.com>
Subject Re: A lucene performance test
Date Tue, 14 Aug 2012 13:05:47 GMT
On Tue, Aug 14, 2012 at 8:58 AM, Stefan Trcek <wzzelfzzel@abas.de> wrote:
> Am Tue, 14 Aug 2012 06:46:22 -0400 schrieb Robert Muir:
>
>> I think this benchmark is not really benchmarking writes at all, but
>> instead the time it takes to wait for merges to complete.
>>
>> don't indexwriter.close() in your benchmark like this.
>
> Ok, but how to? As I understand the api I need at least one commit() to
> make the index usable for searchers. I commit/close each index only
> once so I never force any merges.
>

Commit forces changes to stable storage, ensuring the changes are
there even if your jvm or computer crashes (fsync, etc)

But If you just want to make changes visible to searches, you can open
your reader from IndexWriter (see the NRT ctor) and call openIfChanged
to refresh the view when you need.

-- 
lucidworks.com

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


Mime
View raw message