[
https://issues.apache.org/jira/browse/LUCENE-5489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13939069#comment-13939069
]
Simon Willnauer commented on LUCENE-5489:
-----------------------------------------
it's awesome that we are adding this. I have almost the same code on a high
level in Elasticsearch and it works just great. Ideally I'd love to drop the
code from ES and replace it with the lucene one but I think we need to iterate
more on this. From what I can see the biggest issues are :
* the way how scores are combined is hardcoded (we just multiply)
* we only have one way to rescore ie. we use another query by default which
would be nice if the interface would allow us to use other ways of rescorers.
* most of the goodies are hidden in a static method I think we should add a
nice interface / abstract class
* it would be awesome if the interface could provide a way to get an
Explanation like other queries...
what I think would make sense is something like this:
{code}
public class AbstractRescorer implements Rescore {
@Override
public TopDocs rescore(IndexSearcher searcher, TopDocs topDocs, int topN) {
// do what is done int he static method
}
protected abstract float combine(float originalScore, float resocredScore);
@Override
public Explanation explain(IndexSearcher searcher, Explanation sourceExplain,
int docId) {
// impl explain
}
}
{code}
I hope this makes sense?
> Add query rescoring API
> -----------------------
>
> Key: LUCENE-5489
> URL: https://issues.apache.org/jira/browse/LUCENE-5489
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Michael McCandless
> Assignee: Michael McCandless
> Fix For: 4.8, 5.0
>
> Attachments: LUCENE-5489.patch, LUCENE-5489.patch
>
>
> When costly scoring factors are used during searching, a common
> approach is to do a cheaper / basic query first, collect the top few
> hundred hits, and then rescore those hits using the more costly
> query.
> It's not clear/simple to do this with Lucene today; I think we should
> make it easier.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]