Re: Should IndexWriter.flush return seqNo?

2023-04-26 Thread Patrick Zhai
> Patrick maybe you had an interesting use case in mind? I had one, but later on I found out that I don't necessarily use flush to achieve that so it's not really a valid use case that definitely need flush... On Tue, Apr 25, 2023 at 7:26 PM Ishan Chattopadhyaya < ichattopadhy...@gmail.com>

Re: Should IndexWriter.flush return seqNo?

2023-04-25 Thread Ishan Chattopadhyaya
I think Apache Solr could explore leveraging the returned sequence number for its transaction logs. On Tue, 25 Apr 2023 at 18:36, Michael McCandless wrote: > On Sun, Apr 23, 2023 at 6:19 AM Uwe Schindler wrote: > > Having the sequence number public in API does not bring any benefit, as >> you

Re: Should IndexWriter.flush return seqNo?

2023-04-25 Thread Michael McCandless
On Sun, Apr 23, 2023 at 6:19 AM Uwe Schindler wrote: Having the sequence number public in API does not bring any benefit, as > you cannot use it for anything. > Actually there are some interesting use cases for sequence numbers: They enable the caller to know the effective order of operations

Re: Should IndexWriter.flush return seqNo?

2023-04-23 Thread Robert Muir
> > 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

Re: Should IndexWriter.flush return seqNo?

2023-04-23 Thread Uwe Schindler
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

Re: Should IndexWriter.flush return seqNo?

2023-04-21 Thread Patrick Zhai
Hi Rob, Thanks for explaining, that makes sense to me. Patrick On Fri, Apr 21, 2023 at 7:18 AM Robert Muir wrote: > 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

Re: Should IndexWriter.flush return seqNo?

2023-04-21 Thread 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? It doesn't make much sense that this

Should IndexWriter.flush return seqNo?

2023-04-19 Thread Patrick Zhai
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