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 Mon, 23 Aug 2010 10:33:17 GMT


Michael McCandless commented on LUCENE-2590:

I think the API changes are too complex/heavyweight here!

With this new patch we've added Scorer.ScorerVisitor,
Scorer.SubScorerCallback, Scorer.ScorerContext, and two new
Scorer.accept methods.

The original patch added only a 1-method interface

Can't we simplify this?  I liked your original proposal, breaking out
explicit visitRequired, visitOptional, etc., but keeping this as a
single class.  Or we can go back to the original patch (just passing
an arg expressing the relationship)?

I also don't like the "context" approach, setting attrs on a shared
instance.  This is basically setting up arguments to pass to the
callback -- why not simply pass these arguments (on the stack)

I don't like the "accept" name -- it's very generic -- can we put this
back to visitSubScorers or something that makes it clear you're
visiting the full sub-tree (visitScorers?  visitScorerTree?)?

> 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
> 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