Hi Pratham,

This question is more appropriate for us...@lucene.apache.org. This is the
list for Lucene development.

The best way to omit certain documents is probably via the query itself.
You can use a BooleanQuery to combine your existing keyword-based query
with a MUST_NOT clause that excludes the documents that you don't want to
return.

Hope this helps,
Michael



On Tue, Sep 10, 2024 at 9:00 AM Pratham Agrawal <pratham0...@gmail.com>
wrote:

> Hi Everyone,
>
> I wanted to know what classes to look for in the lucene source code, if I
> want to omit certain documents while searching for a particular keyword
> based query. I saw the bulkScorer class, but couldn't understand the
> competitive iterator stuff. How does Lucene terminate the search early
> using the bulkScorer, etc.
>
> It will be great if someone can help me with this.
>
> Thank you. Regards
>

Reply via email to