@Override protected AcceptStatus accept(Spans candidate) throws IOException { return acceptPosition(candidate); } };
@Override public boolean equals(Object o) { if (! super.equals(o)) { return false; } SpanPositionRangeQuery other = (SpanPositionRangeQuery)o; return this.end == other.end && this.start == other.start; }
@Override public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException { SpanWeight matchWeight = match.createWeight(searcher, false, boost); return new SpanPositionCheckWeight(matchWeight, searcher, needsScores ? getTermContexts(matchWeight) : null, boost); }
@Override public int hashCode() { int h = super.hashCode() ^ end; h = (h * 127) ^ start; return h; }
@Override public Query rewrite(IndexReader reader) throws IOException { if (getBoost() != 1f) { return super.rewrite(reader); } SpanQuery rewritten = (SpanQuery) match.rewrite(reader); if (rewritten != match) { SpanPositionCheckQuery clone = (SpanPositionCheckQuery) this.clone(); clone.match = rewritten; return clone; } return super.rewrite(reader); }
/** Returns true iff <code>other</code> is equal to this. */ @Override public boolean equals(Object other) { return sameClassAs(other) && match.equals(((SpanPositionCheckQuery) other).match); }
@Override public int hashCode() { return classHash() ^ match.hashCode(); } }
protected void flattenQuery(SpanPositionCheckQuery query, float pathBoost, Object sourceOverride, IndexReader reader, Callback callback) { flattenSpan(query.getMatch(), pathBoost, sourceOverride, reader, callback); }
@Override public int hashCode() { int h = super.hashCode() ^ end; h = (h * 127) ^ start; return h; }
@Override public Query rewrite(IndexReader reader) throws IOException { if (getBoost() != 1f) { return super.rewrite(reader); } SpanQuery rewritten = (SpanQuery) match.rewrite(reader); if (rewritten != match) { SpanPositionCheckQuery clone = (SpanPositionCheckQuery) this.clone(); clone.match = rewritten; return clone; } return super.rewrite(reader); }
/** Returns true iff <code>other</code> is equal to this. */ @Override public boolean equals(Object other) { return sameClassAs(other) && match.equals(((SpanPositionCheckQuery) other).match); }
@Override public int hashCode() { return classHash() ^ match.hashCode(); } }
list.addAll(Arrays.asList(extractAutomata(((SpanNotQuery) query).getInclude(), field))); } else if (query instanceof SpanPositionCheckQuery) { list.addAll(Arrays.asList(extractAutomata(((SpanPositionCheckQuery) query).getMatch(), field))); } else if (query instanceof SpanMultiTermQueryWrapper) { list.addAll(Arrays.asList(extractAutomata(((SpanMultiTermQueryWrapper<?>) query).getWrappedQuery(), field)));
@Override public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException { SpanWeight matchWeight = match.createWeight(searcher, false); return new SpanPositionCheckWeight(matchWeight, searcher, needsScores ? getTermContexts(matchWeight) : null); }
@Override protected AcceptStatus accept(Spans candidate) throws IOException { return acceptPosition(candidate); } };
@Override public boolean equals(Object o) { if (! super.equals(o)) { return false; } SpanPositionRangeQuery other = (SpanPositionRangeQuery)o; return this.end == other.end && this.start == other.start; }
@Override public int hashCode() { int h = super.hashCode() ^ end; h = (h * 127) ^ start; return h; }
@Override public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException { SpanWeight matchWeight = match.createWeight(searcher, false, boost); return new SpanPositionCheckWeight(matchWeight, searcher, needsScores ? getTermContexts(matchWeight) : null, boost); }
@Override protected AcceptStatus accept(Spans candidate) throws IOException { return acceptPosition(candidate); } };
@Override public boolean equals(Object o) { if (! super.equals(o)) { return false; } SpanPositionRangeQuery other = (SpanPositionRangeQuery)o; return this.end == other.end && this.start == other.start; }