gsmiller commented on code in PR #12135: URL: https://github.com/apache/lucene/pull/12135#discussion_r1101623346
########## lucene/core/src/java/org/apache/lucene/document/KeywordField.java: ########## @@ -168,8 +171,10 @@ public static Query newExactQuery(String field, String value) { public static Query newSetQuery(String field, BytesRef... values) { Objects.requireNonNull(field, "field must not be null"); Objects.requireNonNull(values, "values must not be null"); + SortedSet<BytesRef> sortedValues = new TreeSet<>(Arrays.asList(values)); return new IndexOrDocValuesQuery( - new TermInSetQuery(field, values), new SortedSetDocValuesSetQuery(field, values)); Review Comment: If we don't end up merging this change, we should clone `values` before invoking `SortedSetDocValuesSetQuery#new` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org