uschindler commented on code in PR #12141: URL: https://github.com/apache/lucene/pull/12141#discussion_r1102800225
########## lucene/core/src/java/org/apache/lucene/document/SortedSetDocValuesSetQuery.java: ########## @@ -51,20 +54,23 @@ final class SortedSetDocValuesSetQuery extends Query implements Accountable { private final PrefixCodedTerms termData; private final int termDataHashCode; // cached hashcode of termData - SortedSetDocValuesSetQuery(String field, BytesRef terms[]) { + /** + * Creates a new {@link TermInSetQuery} from the given collection of terms. This is most efficient + * if it is a sorted set or any other collection which has a presorted and distinct spliterator. + */ + SortedSetDocValuesSetQuery(String field, Collection<BytesRef> terms) { + this(field, terms.stream()); + } + + /** Creates a new {@link TermInSetQuery} from the given array of terms. */ + SortedSetDocValuesSetQuery(String field, BytesRef... terms) { + this(field, Arrays.stream(terms)); + } + + private SortedSetDocValuesSetQuery(String field, Stream<BytesRef> stream) { Review Comment: thats fine. I just made this query with same ctors like TermInSetQuery. But yes as it is pkg private we can make it stupid simple. -- 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