public class LTRRescorer extends Rescorer
LTRScoringQuery
that will assign a
new score to each document. The top documents will be resorted based on the
new score.Constructor and Description |
---|
LTRRescorer(LTRScoringQuery scoringQuery) |
Modifier and Type | Method and Description |
---|---|
Explanation |
explain(IndexSearcher searcher,
Explanation firstPassExplanation,
int docID) |
static LTRScoringQuery.FeatureInfo[] |
extractFeaturesInfo(LTRScoringQuery.ModelWeight modelWeight,
int docid,
Float originalDocScore,
List<LeafReaderContext> leafContexts) |
TopDocs |
rescore(IndexSearcher searcher,
TopDocs firstPassTopDocs,
int topN)
rescores the documents:
|
void |
scoreFeatures(IndexSearcher indexSearcher,
TopDocs firstPassTopDocs,
int topN,
LTRScoringQuery.ModelWeight modelWeight,
ScoreDoc[] hits,
List<LeafReaderContext> leaves,
ScoreDoc[] reranked) |
public LTRRescorer(LTRScoringQuery scoringQuery)
public TopDocs rescore(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN) throws IOException
rescore
in class Rescorer
searcher
- current IndexSearcherfirstPassTopDocs
- documents to rerank;topN
- documents to return;IOException
public void scoreFeatures(IndexSearcher indexSearcher, TopDocs firstPassTopDocs, int topN, LTRScoringQuery.ModelWeight modelWeight, ScoreDoc[] hits, List<LeafReaderContext> leaves, ScoreDoc[] reranked) throws IOException
IOException
public Explanation explain(IndexSearcher searcher, Explanation firstPassExplanation, int docID) throws IOException
explain
in class Rescorer
IOException
public static LTRScoringQuery.FeatureInfo[] extractFeaturesInfo(LTRScoringQuery.ModelWeight modelWeight, int docid, Float originalDocScore, List<LeafReaderContext> leafContexts) throws IOException
IOException
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.