@Override public boolean needsScores() { return producer.needsScores(); }
@Override public boolean needsScores() { return inner.needsScores(); }
@Override public boolean needsScores() { return producer.needsScores(); }
@Override public boolean needsScores() { return inner.needsScores(); }
/** * Sole constructor. * @param queries Sub queries to match. * @param minimumNumberMatch Per-document long value that records how many queries * should match. Values that are less than 1 are treated * like <tt>1</tt>: only documents that have at least one * matching clause will be considered matches. Documents * that do not have a value for <tt>minimumNumberMatch</tt> * do not match. */ public CoveringQuery(Collection<Query> queries, LongValuesSource minimumNumberMatch) { if (queries.size() > BooleanQuery.getMaxClauseCount()) { throw new BooleanQuery.TooManyClauses(); } if (minimumNumberMatch.needsScores()) { throw new IllegalArgumentException("The minimum number of matches may not depend on the score."); } this.queries = new Multiset<>(); this.queries.addAll(queries); this.minimumNumberMatch = Objects.requireNonNull(minimumNumberMatch); this.hashCode = computeHashCode(); }