[ 
https://issues.apache.org/jira/browse/LUCENE-2590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899000#action_12899000
 ] 

Simon Willnauer commented on LUCENE-2590:
-----------------------------------------

{quote}
The heavy generics would be useful for apps that eg have a fixed structure to 
all Queries right? Eg if you know your app only ever makes BooleanQuery w/ 
TermQuery sub-classes, you'd parameterize the instantiation as 
<BooleanQuery,TermQuery,TermScrorer> (hmm though TermScorer isn't public; maybe 
just leave S as Scorer)? I think this makes sense.
{quote}

jep, this is exactly what I was aiming at. Scorer might be an exception but in 
general this it what you would do. A special case where I could think of is 
FuzzyQuery where you can tell from the rewrite method what kind of query will 
be constructed and where this information could be useful (think of 
spellchecking of similar usecases)

bq. I'll work on these but it'll be a little while - I'm out on "vacation".
Good to hear, enjoy! I might update you patch accordingly before you come back 
though!

simon

> 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, 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to