Skip to content
Merged
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
3 changes: 3 additions & 0 deletions lucene/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ Bug Fixes

* GITHUB#14682 : Fix for add char and token filters in Luke Analysis tab. (Amir Raza)

* GITHUB#14161: PointInSetQuery's constructor now throws IllegalArgumentException
instead of UnsupportedOperationException when values are out of order. (Shubham Sharma)

Build
---------------------
* Upgrade forbiddenapis to version 3.9. (Uwe Schindler)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,9 @@ public boolean equals(Object obj) {
public int hashCode() {
throw new UnsupportedOperationException();
}

@Override
public String toString() {
return this.get().toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2599,4 +2599,33 @@ public void testPointInSetQuerySkipsNonMatchingSegments() throws IOException {
w.close();
dir.close();
}

public void testOutOfOrderValuesInPointInSetQuery() throws Exception {
IllegalArgumentException expected =
expectThrows(
IllegalArgumentException.class,
() -> {
new PointInSetQuery(
"foo",
1,
1,
new PointInSetQuery.Stream() {
private final BytesRef[] values = {
newBytesRef(new byte[] {2}), newBytesRef(new byte[] {1}) // out of order
};
int index = 0;

@Override
public BytesRef next() {
return index < values.length ? values[index++] : null;
}
}) {
@Override
protected String toString(byte[] point) {
return Arrays.toString(point);
}
};
});
assertEquals("values are out of order: saw [2] before [1]", expected.getMessage());
}
}