/** * Default constructor. */ protected FilterWeight(Weight weight) { this(weight.getQuery(), weight); }
CachingWrapperWeight(Weight in, QueryCachingPolicy policy) { super(in.getQuery(), 1f); this.in = in; this.policy = policy; used = new AtomicBoolean(false); }
protected CachingWeightWrapper(Weight in) { super(in.getQuery()); this.in = in; }
final Weight cancellableWeight; if (checkCancelled != null) { cancellableWeight = new Weight(weight.getQuery()) {
@Override public Query getQuery() { return _innerWeight.getQuery(); }
/** * Default constructor. */ protected FilterWeight(Weight weight) { this(weight.getQuery(), weight); }
protected CachingWeightWrapper(Weight in) { super(in.getQuery()); this.in = in; }
@Override public Query getQuery() { return _innerWeight.getQuery(); }
protected CachingWeightWrapper(Weight in) { super(in.getQuery()); this.in = in; }
protected CachingWeightWrapper(Weight in) { super(in.getQuery()); this.in = in; }
protected CachingWeightWrapper(Weight in) { super(in.getQuery()); this.in = in; }
CachingWrapperWeight(Weight in, QueryCachingPolicy policy) { super(in.getQuery(), 1f); this.in = in; this.policy = policy; used = new AtomicBoolean(false); }
CachingWrapperWeight(Weight in, QueryCachingPolicy policy) { super(in.getQuery()); this.in = in; this.policy = policy; used = new AtomicBoolean(false); }
CachingWrapperWeight(Weight in, QueryCachingPolicy policy) { super(in.getQuery()); this.in = in; this.policy = policy; used = new AtomicBoolean(false); }
public Explanation explain() { if (docID() == backwardsIterator.docID()) { return Explanation.match(BACKWARDS_SCORE, "Backwards term match " + this.getWeight().getQuery()); } else if (docID() == forwardIterator.docID()) { return Explanation.match(FORWARDS_SCORE, "Forward term match " + this.getWeight().getQuery()); } return null; }
private boolean shouldCache(LeafReaderContext context) throws IOException { return cacheEntryHasReasonableWorstCaseSize(ReaderUtil.getTopLevelContext(context).reader().maxDoc()) && policy.shouldCache(in.getQuery(), context); }
private boolean shouldCache(LeafReaderContext context) throws IOException { return cacheEntryHasReasonableWorstCaseSize(ReaderUtil.getTopLevelContext(context).reader().maxDoc()) && policy.shouldCache(in.getQuery(), context); }
public Explanation explain(int doc) throws IOException { TermQuery query = (TermQuery)weight.getQuery(); Explanation tfExplanation = new Explanation(); int tf = 0; while (pointer < pointerMax) { if (docs[pointer] == doc) tf = freqs[pointer]; pointer++; } if (tf == 0) { while (termDocs.next()) { if (termDocs.doc() == doc) { tf = termDocs.freq(); } } } termDocs.close(); tfExplanation.setValue(getSimilarity().tf(tf)); tfExplanation.setDescription("tf(termFreq("+query.getTerm()+")="+tf+")"); return tfExplanation; }