Change default ReadAdvice from RANDOM to NORMAL#15040
Merged
ChrisHegarty merged 3 commits intoapache:mainfrom Aug 8, 2025
Merged
Change default ReadAdvice from RANDOM to NORMAL#15040ChrisHegarty merged 3 commits intoapache:mainfrom
ChrisHegarty merged 3 commits intoapache:mainfrom
Conversation
Contributor
|
This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR. |
Contributor
|
This seems like good progress. I'm also unsure about |
msokolov
approved these changes
Aug 8, 2025
Contributor
|
Yeah, I worry that this now conflicts with what we did in the vectors reader, since the default will be normal, but after merging any vectors segments we will switch back to random? |
Contributor
Author
thecoop
reviewed
Aug 8, 2025
thecoop
approved these changes
Aug 8, 2025
jpountz
pushed a commit
to shubhamvishu/lucene
that referenced
this pull request
Aug 10, 2025
This commit changes the default ReadAdvice from RANDOM to NORMAL. After this change MMapDirectory will not set any specific read advice out-of-the-box. Rather there is a straightforward way to enable either previous behaviour ( in 10.2 ), by setting either: 1. dir.setReadAdvice(MMapDirectory.ADVISE_BY_CONTEXT), or 2. setting the system property -Dorg.apache.lucene.store.defaultReadAdvice=RANDOM. closes apache#14408
ChrisHegarty
added a commit
that referenced
this pull request
Aug 11, 2025
This commit changes the default ReadAdvice from RANDOM to NORMAL. After this change MMapDirectory will not set any specific read advice out-of-the-box. Rather there is a straightforward way to enable either previous behaviour ( in 10.2 ), by setting either: 1. dir.setReadAdvice(MMapDirectory.ADVISE_BY_CONTEXT), or 2. setting the system property -Dorg.apache.lucene.store.defaultReadAdvice=RANDOM. closes #14408
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit changes the default ReadAdvice from RANDOM to NORMAL.
After this change MMapDirectory will not set any specific read advice out-of-the-box. Rather there is a straightforward way to enable either previous behaviour ( in 10.2 ), by setting either:
dir.setReadAdvice(MMapDirectory.ADVISE_BY_CONTEXT), or-Dorg.apache.lucene.store.defaultReadAdvice=RANDOM.closes #14408