You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2010/08/08 16:15:15 UTC
[jira] Updated: (LUCENE-2590) Enable access to the freq information
in a Query's sub-scorers
[ https://issues.apache.org/jira/browse/LUCENE-2590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael McCandless updated LUCENE-2590:
---------------------------------------
Attachment: LUCENE-2590.patch
Attached patch.
There were two things to fix. First, I added Scorer.freq() so that
you could get the freq of the current match. Second, I added a way to
visit all sub-scorers for a given Scorer. The functionality is
definitely expert level -- you'll have to make a custom Collector that
gathers these stats & saves them away in your PQ, to use this "for
real". But it's a good start I think; there's a simple test case
showing how it works.
> Enable access to the freq information in a Query's sub-scorers
> --------------------------------------------------------------
>
> Key: LUCENE-2590
> URL: https://issues.apache.org/jira/browse/LUCENE-2590
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Search
> Reporter: Michael McCandless
> Assignee: Michael McCandless
> Attachments: 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org