Searching within very large subset of documents

Thomas Barr <[email protected]> Mon, 4 Aug 2025 20:46:55 -0700
Newsgroups gmane.comp.jakarta.lucene.user
Message-ID <[email protected]>
I have a medium-sized (~10m) Lucene index and I frequently want to =
repeatedly search within a subset of around ~100k documents. I can =
increase MaxClauseCount and build up a huge TermQuery, keep that around, =
then build a BooleanQuery out of the result at runtime, but the =
resulting query is quite slow. The now deprecated Filter would have been =
a good option with a BitSet, but that=E2=80=99s deprecated.

Any thoughts on the best way to do this?

Thanks!
-twb