List of usage examples for org.apache.lucene.search ScoreCachingWrappingScorer ScoreCachingWrappingScorer
public ScoreCachingWrappingScorer(Scorable scorer)
From source file:org.codelibs.elasticsearch.common.lucene.MinimumScoreCollector.java
License:Apache License
@Override public void setScorer(Scorer scorer) throws IOException { if (!(scorer instanceof ScoreCachingWrappingScorer)) { scorer = new ScoreCachingWrappingScorer(scorer); }/*from www.j a va2 s . com*/ this.scorer = scorer; leafCollector.setScorer(scorer); }
From source file:org.codelibs.elasticsearch.common.lucene.search.function.MinScoreScorer.java
License:Apache License
MinScoreScorer(Weight weight, Scorer scorer, float minScore) { super(weight); if (scorer instanceof ScoreCachingWrappingScorer == false) { // when minScore is set, scores might be requested twice: once // to verify the match, and once by the collector scorer = new ScoreCachingWrappingScorer(scorer); }/* w w w . ja v a 2 s. co m*/ this.in = scorer; this.minScore = minScore; }
From source file:org.elasticsearch.common.lucene.MinimumScoreCollector.java
License:Apache License
@Override public void setScorer(Scorer scorer) throws IOException { if (!(scorer instanceof ScoreCachingWrappingScorer)) { scorer = new ScoreCachingWrappingScorer(scorer); }/* w w w . j av a2 s.com*/ this.scorer = scorer; collector.setScorer(scorer); }
From source file:org.elasticsearch.common.lucene.MultiCollector.java
License:Apache License
@Override public void setScorer(Scorer scorer) throws IOException { // always wrap it in a scorer wrapper if (!(scorer instanceof ScoreCachingWrappingScorer)) { scorer = new ScoreCachingWrappingScorer(scorer); }// www . ja va 2s . c o m collector.setScorer(scorer); for (Collector collector : collectors) { collector.setScorer(scorer); } }