Hello Igor,
Accessing a potential match during scoring is problematic. Piggibacking on
wrapped boolean query is not an option because when a certain docId is
collected matching legs might reside on previous or next docID.
You can check these for the inspiration
https://lucene.apache.org/core/9_0_0/
I want to access matched terms before they go to TopDocs somehow during
search.
Maybe I should write a custom collector?
пн, 17 июл. 2023 г. в 20:54, nedyalko.zhe...@freelance.de.INVALID
:
> Hi Igor,
>
> I have similar situation and have written the following code:
>
> TopDocs topDocs = this.sear
Hi Igor,
I have similar situation and have written the following code:
TopDocs topDocs = this.searcher.search(query, maxResults);
Weight weight =
query.rewrite(this.searcher.getIndexReader()).createWeight(this.searcher,
ScoreMode.TOP_DOCS, 1.0f);
for (ScoreDoc scoreDoc : topDocs.scoreDocs) {
tHi Mikhail,
I've finally implemented in this way. Sorry for the delayed answer.
TopDocs topDocs = this.searcher.search(query, maxResults);
Weight weight =
query.rewrite(this.searcher.getIndexReader()).createWeight(this.searcher,
ScoreMode.TOP_DOCS, 1.0f);
for (ScoreDoc scoreDoc : topDocs.sc
I'm writing custom lucene query which is basically a wrapper around boolean
query with many should clauses.
I want to access this boolean query's matched terms, and then either filter
out this document depending on external statistics on those terms or
proceed with this document without affecting