You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by nic k <ks...@gmail.com> on 2021/08/02 06:07:36 UTC

hello~~i have a question

hello i have a question, so im sending u an e-mail

when searching in lucene, i wonder if it reads from the oldest segment or
the most recently created segment

when i test it, i think it reads the oldest file first, but i ask for
conviction, not conjecture
please im looking around and i cant figure it out so i ask
thank u

Re: hello~~i have a question

Posted by Michael Wechner <mi...@wyona.com>.
I don't know either, whereas I searched  a little and found various good 
explanations what segments are, e.g.

https://www.alibabacloud.com/blog/analysis-of-lucene---basic-concepts_594672

but not in which order the segments are being read.

I am nore sure where in the code the segments are being read, but did 
you already have a look at the source code?

https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/index/IndexReader.java
https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java
https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java

HTH

Michael



Am 02.08.21 um 08:07 schrieb nic k:
> hello i have a question, so im sending u an e-mail
>
> when searching in lucene, i wonder if it reads from the oldest segment or
> the most recently created segment
>
> when i test it, i think it reads the oldest file first, but i ask for
> conviction, not conjecture
> please im looking around and i cant figure it out so i ask
> thank u
>


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