lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roberto Franchini <franch...@celi.it>
Subject Re: Replicator: how to use it?
Date Mon, 24 Mar 2014 16:31:25 GMT
On Thu, Mar 20, 2014 at 8:47 AM, Shai Erera <serera@gmail.com> wrote:
>>
>> Even if the commit is called just before the close, the close triggers
>> a last commit.
>>
>
> That seems wrong. If you do writer.commit() and them immediately
> writer.close(), and there are no changes to the writer in between (i.e. a
> thread comes in and adds/updates/deletes a document), then close() should
> not create a new commit point. Do you see that it does?

Hi,
I've added a waitForMerges call before the last commit, then I close the writer:

            writer.waitForMerges();
            writer.commit();
            replicator. replicate(new IndexRevision(writer));
writer.close();

Now it works.
Thank you very much for the support.
RF
-- 
Roberto Franchini
The impossible is inevitable.
http://www.celi.it                     http://www.blogmeter.it
http://github.com/celi-uim       http://github.com/robfrank
Tel +39.011.562.71.15
jabber:ro.franchini@gmail.com skype:ro.franchini tw:@robfrankie

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


Mime
View raw message