@Override public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException { SpanWeight bigWeight = big.createWeight(searcher, false, boost); SpanWeight littleWeight = little.createWeight(searcher, false, boost); return new SpanContainingWeight(searcher, needsScores ? getTermContexts(bigWeight, littleWeight) : null, bigWeight, littleWeight, boost); }
@Override public String toString(String field) { return toString(field, "SpanContaining"); }
@Override protected Query doToQuery(QueryShardContext context) throws IOException { Query innerBig = big.toQuery(context); assert innerBig instanceof SpanQuery; Query innerLittle = little.toQuery(context); assert innerLittle instanceof SpanQuery; return new SpanContainingQuery((SpanQuery) innerBig, (SpanQuery) innerLittle); }
@Override protected Query doToQuery(QueryShardContext context) throws IOException { Query innerBig = big.toQuery(context); assert innerBig instanceof SpanQuery; Query innerLittle = little.toQuery(context); assert innerLittle instanceof SpanQuery; return new SpanContainingQuery((SpanQuery) innerBig, (SpanQuery) innerLittle); }
@Override final public SpanQuery getQuery(final QueryContext queryContext) throws IOException, ParseException, ReflectiveOperationException, QueryNodeException { return new org.apache.lucene.search.spans.SpanContainingQuery(big.getQuery(queryContext), little.getQuery(queryContext)); }
@Override public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException { SpanWeight bigWeight = big.createWeight(searcher, false, boost); SpanWeight littleWeight = little.createWeight(searcher, false, boost); return new SpanContainingWeight(searcher, needsScores ? getTermContexts(bigWeight, littleWeight) : null, bigWeight, littleWeight, boost); }
@Override public String toString(String field) { return toString(field, "SpanContaining"); }
@Override protected Query doToQuery(QueryShardContext context) throws IOException { Query innerBig = big.toQuery(context); assert innerBig instanceof SpanQuery; Query innerLittle = little.toQuery(context); assert innerLittle instanceof SpanQuery; return new SpanContainingQuery((SpanQuery) innerBig, (SpanQuery) innerLittle); }
@Override public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException { SpanWeight bigWeight = big.createWeight(searcher, false); SpanWeight littleWeight = little.createWeight(searcher, false); return new SpanContainingWeight(searcher, needsScores ? getTermContexts(bigWeight, littleWeight) : null, bigWeight, littleWeight); }
@Override public String toString(String field) { return toString(field, "SpanContaining"); }
@Override protected Query doToQuery(QueryShardContext context) throws IOException { Query innerBig = big.toQuery(context); assert innerBig instanceof SpanQuery; Query innerLittle = little.toQuery(context); assert innerLittle instanceof SpanQuery; return new SpanContainingQuery((SpanQuery) innerBig, (SpanQuery) innerLittle); }
@Override public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException { SpanWeight bigWeight = big.createWeight(searcher, false); SpanWeight littleWeight = little.createWeight(searcher, false); return new SpanContainingWeight(searcher, needsScores ? getTermContexts(bigWeight, littleWeight) : null, bigWeight, littleWeight); }
@Override public String toString(String field) { return toString(field, "SpanContaining"); }
@Override protected Query doToQuery(QueryShardContext context) throws IOException { Query innerBig = big.toQuery(context); assert innerBig instanceof SpanQuery; Query innerLittle = little.toQuery(context); assert innerLittle instanceof SpanQuery; return new SpanContainingQuery((SpanQuery) innerBig, (SpanQuery) innerLittle); }
Query query = new SpanContainingQuery(big, little); if (boost != 1.0F) { query.setBoost(boost);