lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-1999) Match spotter for all query types
Date Sat, 14 Apr 2012 18:17:17 GMT


Robert Muir commented on LUCENE-1999:

I think this issue is before the scorer navigation api???: LUCENE-2590, LUCENE-3330.

If you want to know the inner details of subscorers and such, you can
enumerate the Scorer "tree" inside your Collector.setNextReader, e.g. saving
references to the subscorers you care about, and then in collect() you can
do whatever you want via their freq()/score()/ etc methods to find out which
ones matched...

This is in trunk today and generally works, though there are some bugs to iron out
(see LUCENE-3505 for example)

> Match spotter for all query types
> ---------------------------------
>                 Key: LUCENE-1999
>                 URL:
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: core/search
>    Affects Versions: 2.9
>            Reporter: Mark Harwood
>         Attachments: matchflagger.patch
> Related to LUCENE-1929 and the current inability to highlight NumericRangeQuery, spatial,
cached term filters and other exotica.
> This patch provides the ability to wrap *any* Query objects and record match info as
flags encoded in the overall document score.
> Using this approach it would be possible to understand (and therefore highlight) which
fields matched clauses in a query.
> The match encoding approach loses some precision in scores as noted here:
> Avoiding these precision issues would require a change to Lucene core to record docId,
score AND a matchFlag byte in ScoreDoc objects and collector APIs.
> This may be something we should consider.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message