lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] Commented: (LUCENE-2590) Enable access to the freq information in a Query's sub-scorers
Date Tue, 24 Aug 2010 12:22:18 GMT


Michael McCandless commented on LUCENE-2590:

Patch looks good!  Thanks, Simon.

Can we factor out that switch statement into super's visitSubScorers?  This way the base (Scorer)
impl would be responsible for visiting "this", and then the subclass would override only if
it had subs (ie BS, BS2)?

Also, we are missing some scorers (SpanScorer, ConstantScoreQuery.ConstantScorer, probably
others), but if we do the super approach, we'd get these "for free" (I think?).

Oh I see we can't quite have Scorer impl this because it doesn't know the query.   But maybe
we can factor out a common method, that the subclass passed the query to?

> Enable access to the freq information in a Query's sub-scorers
> --------------------------------------------------------------
>                 Key: LUCENE-2590
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>         Attachments: LUCENE-2590.patch, LUCENE-2590.patch, LUCENE-2590.patch, LUCENE-2590.patch
> The ability to gather more details than just the score, of how a given
> doc matches the current query, has come up a number of times on the
> user's lists.  (most recently in the thread "Query Match Count" by
> Ryan McV on java-user).
> EG if you have a simple TermQuery "foo", on each hit you'd like to
> know how many times "foo" occurred in that doc; or a BooleanQuery +foo
> +bar, being able to separately see the freq of foo and bar for the
> current hit.
> Lucene doesn't make this possible today, which is a shame because
> Lucene in fact does compute exactly this information; it's just not
> accessible from the Collector.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message