Examples of PwaLinearRankingModel


Examples of org.apache.lucene.search.features.PwaLinearRankingModel

  public float score() throws IOException {       
    if (scoreType==ScoreType.NORMAL) {     
      PwaRawFeatureCollector collector=new PwaRawFeatureCollector(reader);
      joiner.collectFeatures(doc(),collector);   
      PwaScores scores=PwaScorerFeatures.score(doc(),queryTimestamp,collector,joiner.getPositionsManager(),searcher,functions);
      return (new PwaLinearRankingModel()).score(functions, scores); // TODO parameterize the ranking model in the future
    }
    else if (scoreType==ScoreType.DATE_SORTED || scoreType==ScoreType.DATE_SORTED_REVERSE) { // results are sorted in TopDocCollector
      PwaDateCache sortCache=new PwaDateCache(reader);
      return sortCache.getTimestamp(doc());     
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.