Hi,

Am 21.04.2023 um 16:16 schrieb Robert Muir:
This is not true: if i call IndexWriter.commit, then i can open an
indexreader and see the documents.

IndexWriter.flush doesn't do anything at all, really, just moves stuff
from RAM to disk but not in a way that indexreader can see it or
anything, right?

Yes thats true, I just have to add: You can still open a NRT reader directly from IndexWriter. But you don't need a sequence number there as its hidden completely. So flushing is fine to allow users to get a new NRT reader with the state up to that point, but it does not need to return anything.

Having the sequence number public in API does not bring any benefit, as you cannot use it for anything.

It doesn't make much sense that this method is public in the API,
definitely adding sequence number makes no sense since nothing was
committed here.
+1

On Thu, Apr 20, 2023 at 1:28 AM Patrick Zhai <zhai7...@gmail.com> wrote:
Hi folks,
I just realized that while "commit" returns the sequence number which represents the 
latest event that committed in the index, "flush" still returns nothing. Since they're 
essentially the same except fsync I wonder whether there's any specific reason to not do so?

Best
Patrick
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

--
Uwe Schindler
Achterdiek 19, D-28357 Bremen
https://www.thetaphi.de
eMail: u...@thetaphi.de


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

Reply via email to