gsmiller commented on code in PR #12280:
URL: https://github.com/apache/lucene/pull/12280#discussion_r1188857287


##########
lucene/sandbox/src/java/org/apache/lucene/sandbox/search/PKTermInSetQuery.java:
##########
@@ -0,0 +1,117 @@
+package org.apache.lucene.sandbox.search;
+
+import java.io.IOException;
+import java.util.Collection;
+import org.apache.lucene.index.ImpactsEnum;
+import org.apache.lucene.index.PostingsEnum;
+import org.apache.lucene.index.TermState;
+import org.apache.lucene.index.Terms;
+import org.apache.lucene.index.TermsEnum;
+import org.apache.lucene.search.TermInSetQuery;
+import org.apache.lucene.util.AttributeSource;
+import org.apache.lucene.util.BytesRef;
+import org.apache.lucene.util.BytesRefIterator;
+
+/**
+ * {@link TermInSetQuery} optimized for a primary key-like field.
+ *
+ * <p>Relies on {@link TermsEnum#seekExact(BytesRef)} instead of {@link
+ * TermsEnum#seekCeil(BytesRef)} to produce a terms iterator, which is 
compatible with {@code
+ * BloomFilteringPostingsFormat}.
+ */
+public class PKTermInSetQuery extends TermInSetQuery {

Review Comment:
   This class is for demo purposes only. I'm not suggesting we merge it as part 
of this PR. I only want to demonstrate how a class might leverage 
`getQueryTerms`.



-- 
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

Reply via email to