Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lucene/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ Optimizations
* GITHUB#15474: Use bulk scoring provided by RandomVectorScorers for new scalar quantized formats provided through
Lucene104ScalarQuantizedVectorsFormat and Lucene104HnswScalarQuantizedVectorsFormat (Ben Trent)

* GITHUB#15498: ExitableDirectoryReader keeps singleton SortedSetDocValues or SortedNumericDocValues as singletons. (Houston Putman)

Bug Fixes
---------------------
* GITHUB#14161: PointInSetQuery's constructor now throws IllegalArgumentException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ public CacheHelper getCoreCacheHelper() {

@Override
public NumericDocValues getNumericDocValues(String field) throws IOException {
final NumericDocValues numericDocValues = super.getNumericDocValues(field);
return wrapNumericDocValues(super.getNumericDocValues(field));
}

private NumericDocValues wrapNumericDocValues(final NumericDocValues numericDocValues) {
if (numericDocValues == null) {
return null;
}
Expand Down Expand Up @@ -191,7 +194,10 @@ public int nextDoc() throws IOException {

@Override
public SortedDocValues getSortedDocValues(String field) throws IOException {
final SortedDocValues sortedDocValues = super.getSortedDocValues(field);
return wrapSortedDocValues(super.getSortedDocValues(field));
}

private SortedDocValues wrapSortedDocValues(final SortedDocValues sortedDocValues) {
if (sortedDocValues == null) {
return null;
}
Expand Down Expand Up @@ -234,6 +240,10 @@ public int nextDoc() throws IOException {
@Override
public SortedNumericDocValues getSortedNumericDocValues(String field) throws IOException {
final SortedNumericDocValues sortedNumericDocValues = super.getSortedNumericDocValues(field);
final NumericDocValues numericDocValues = DocValues.unwrapSingleton(sortedNumericDocValues);
if (numericDocValues != null) {
return DocValues.singleton(wrapNumericDocValues(numericDocValues));
}
if (sortedNumericDocValues == null) {
return null;
}
Expand Down Expand Up @@ -279,6 +289,10 @@ public SortedSetDocValues getSortedSetDocValues(String field) throws IOException
if (sortedSetDocValues == null) {
return null;
}
final SortedDocValues sortedDocValues = DocValues.unwrapSingleton(sortedSetDocValues);
if (sortedDocValues != null) {
return DocValues.singleton(wrapSortedDocValues(sortedDocValues));
}
return new FilterSortedSetDocValues(sortedSetDocValues) {

private int docToCheck = 0;
Expand Down