@Override public Scorer scorer(AtomicReaderContext context, Bits acceptDocs) throws IOException { return new PayloadTermSpanScorer((TermSpans) query.getSpans(context, acceptDocs, termContexts), this, similarity.simScorer(stats, context)); }
public PayloadTermSpanScorer(TermSpans spans, Weight weight, Similarity.SimScorer docScorer) throws IOException { super(spans, weight, docScorer); termSpans = spans; }
@Override public Scorer scorer(AtomicReaderContext context, boolean scoreDocsInOrder, boolean topScorer, Bits acceptDocs) throws IOException { return new PayloadTermSpanScorer((TermSpans) query.getSpans(context, acceptDocs, termContexts), this, similarity.sloppySimScorer(stats, context)); }
public PayloadTermSpanScorer(TermSpans spans, Weight weight, Similarity.SloppySimScorer docScorer) throws IOException { super(spans, weight, docScorer); termSpans = spans; }
@Override public Scorer scorer(AtomicReaderContext context, boolean scoreDocsInOrder, boolean topScorer, Bits acceptDocs) throws IOException { return new PayloadTermSpanScorer((TermSpans) query.getSpans(context, acceptDocs, termContexts), this, similarity.simScorer(stats, context)); }
/** * Creates TermSpansWithId from the given spanTermWithIdQuery. * * @param spanTermWithIdQuery * a spanTermWithIdQuery * @param context * @param acceptDocs * @param termContexts * @throws IOException */ public TermSpansWithId (SpanTermWithIdQuery spanTermWithIdQuery, LeafReaderContext context, Bits acceptDocs, Map<Term, TermContext> termContexts) throws IOException { super(spanTermWithIdQuery, context, acceptDocs, termContexts); termSpans = (TermSpans) firstSpans; hasMoreSpans = termSpans.next(); hasSpanId = true; }
/** * Constructs ElementSpans for the given {@link SpanElementQuery}. * * @param spanElementQuery * A {@link SpanElementQuery}. * @param context * The {@link LeafReaderContext}. * @param acceptDocs * Bit vector representing the documents * to be searched in. * @param termContexts * A map managing {@link TermState TermStates}. * @throws IOException */ public ElementSpans (SpanElementQuery spanElementQuery, LeafReaderContext context, Bits acceptDocs, Map<Term, TermContext> termContexts) throws IOException { super(spanElementQuery, context, acceptDocs, termContexts); termSpans = (TermSpans) this.firstSpans; hasMoreSpans = true; if (DEBUG) log.trace("Create ElementSpan"); }