@Override public Matches matches(LeafReaderContext context, int doc) throws IOException { // We need to check a single doc, so the dv query should perform better return dvWeight.matches(context, doc); }
@Override public Matches matches(LeafReaderContext context, int doc) throws IOException { return in.matches(context, doc); }
@Override public Matches matches(LeafReaderContext context, int doc) throws IOException { return in.matches(context, doc); } }
@Override public Matches matches(LeafReaderContext context, int doc) throws IOException { return innerWeight.matches(context, doc); }
@Override public Matches matches(LeafReaderContext context, int doc) throws IOException { List<Matches> mis = new ArrayList<>(); for (Weight weight : weights) { Matches mi = weight.matches(context, doc); if (mi != null) { mis.add(mi); } } return MatchesUtils.fromSubMatches(mis); }
Weight w = wIt.next(); BooleanClause bc = cIt.next(); Matches m = w.matches(context, doc); if (bc.isProhibited()) { if (m != null) {
@Override public Matches matches(LeafReaderContext context, int doc) throws IOException { String field = terms[0].field(); Terms terms = context.reader().terms(field); if (terms == null || terms.hasPositions() == false) { return super.matches(context, doc); } return MatchesUtils.forField(field, () -> DisjunctionMatchesIterator.fromTerms(context, doc, getQuery(), field, Arrays.asList(SynonymQuery.this.terms))); }
@Override public Matches matches(LeafReaderContext context, int doc) throws IOException { TermsEnum te = getTermsEnum(context); if (te == null) { return null; } if (context.reader().terms(term.field()).hasPositions() == false) { return super.matches(context, doc); } return MatchesUtils.forField(term.field(), () -> { PostingsEnum pe = te.postings(null, PostingsEnum.OFFSETS); if (pe.advance(doc) != doc) { return null; } return new TermMatchesIterator(getQuery(), pe); }); }
@Override public Matches matches(LeafReaderContext context, int doc) throws IOException { return in.matches(context, doc); } }
@Override public Matches matches(LeafReaderContext context, int doc) throws IOException { return in.matches(context, doc); }
@Override public Matches matches(LeafReaderContext context, int doc) throws IOException { // We need to check a single doc, so the dv query should perform better return dvWeight.matches(context, doc); }
@Override public Matches matches(LeafReaderContext context, int doc) throws IOException { return inner.matches(context, doc); }
@Override public Matches matches(LeafReaderContext context, int doc) throws IOException { return innerWeight.matches(context, doc); }
@Override public Matches matches(LeafReaderContext context, int doc) throws IOException { List<Matches> mis = new ArrayList<>(); for (Weight weight : weights) { Matches mi = weight.matches(context, doc); if (mi != null) { mis.add(mi); } } return MatchesUtils.fromSubMatches(mis); }
@Override public Matches matches(LeafReaderContext context, int doc) throws IOException { LongValues minMatchValues = minimumNumberMatch.getValues(context, null); if (minMatchValues.advanceExact(doc) == false) { return null; } final long minimumNumberMatch = Math.max(1, minMatchValues.longValue()); long matchCount = 0; List<Matches> subMatches = new ArrayList<>(); for (Weight weight : weights) { Matches matches = weight.matches(context, doc); if (matches != null) { matchCount++; subMatches.add(matches); } } if (matchCount < minimumNumberMatch) { return null; } return MatchesUtils.fromSubMatches(subMatches); }
Weight w = wIt.next(); BooleanClause bc = cIt.next(); Matches m = w.matches(context, doc); if (bc.isProhibited()) { if (m != null) {
@Override public Matches matches(LeafReaderContext context, int doc) throws IOException { String field = terms[0].field(); Terms terms = context.reader().terms(field); if (terms == null || terms.hasPositions() == false) { return super.matches(context, doc); } return MatchesUtils.forField(field, () -> DisjunctionMatchesIterator.fromTerms(context, doc, getQuery(), field, Arrays.asList(SynonymQuery.this.terms))); }
@Override public Matches matches(LeafReaderContext context, int doc) throws IOException { TermsEnum te = getTermsEnum(context); if (te == null) { return null; } if (context.reader().terms(term.field()).hasPositions() == false) { return super.matches(context, doc); } return MatchesUtils.forField(term.field(), () -> { PostingsEnum pe = te.postings(null, PostingsEnum.OFFSETS); if (pe.advance(doc) != doc) { return null; } return new TermMatchesIterator(getQuery(), pe); }); }