gsmiller commented on PR #12141: URL: https://github.com/apache/lucene/pull/12141#issuecomment-1426790254
+1 that it would be nice to avoid the duplicate prefix-encoding (and storing that duplicate data for two queries in memory). Ideally, it would be nice if `TermInSetQuery` where pkg-private, just acting as an implementation detail behind factory methods like `KeywordField#newSetQuery`. It might be a bit too extreme, but I wonder if we should consider making this change and asking our users to get their "term in set" query functionality behind exposed factory methods. Less drastic than essentially deprecating the public definition of `TermInSetQuery` could be to create a new class definition for a "set of terms" that wraps `PrefixCodedTerms` and is used in the ctor. This could provide an abstraction on top of the `PrefixCodedTerms` implementation detail, allowing us to change that in the future without changing our interface. -- 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