Module org.elasticsearch.compute
Package org.elasticsearch.compute.lucene
Class LuceneQueryExpressionEvaluator
java.lang.Object
org.elasticsearch.compute.lucene.LuceneQueryEvaluator<BooleanVector.Builder>
org.elasticsearch.compute.lucene.LuceneQueryExpressionEvaluator
- All Implemented Interfaces:
Closeable,AutoCloseable,EvalOperator.ExpressionEvaluator,org.elasticsearch.core.Releasable
public class LuceneQueryExpressionEvaluator
extends LuceneQueryEvaluator<BooleanVector.Builder>
implements EvalOperator.ExpressionEvaluator
EvalOperator.ExpressionEvaluator to run a Lucene Query during
the compute engine's normal execution, yielding matches/does not match into
a BooleanVector.- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.elasticsearch.compute.lucene.LuceneQueryEvaluator
LuceneQueryEvaluator.ShardConfig -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendMatch(BooleanVector.Builder builder, org.apache.lucene.search.Scorable scorer) Appends a matching result to a builder created by @link createVectorBuilder}protected voidappendNoMatch(BooleanVector.Builder builder) Appends a non matching result to a builder created by @link createVectorBuilder}protected VectorcreateNoMatchVector(BlockFactory blockFactory, int size) Creates a vector where all positions correspond to elements that don't match the queryprotected BooleanVector.BuildercreateVectorBuilder(BlockFactory blockFactory, int size) Creates the corresponding vector builder to store the results of evaluating the queryEvaluate the expression.protected org.apache.lucene.search.ScoreModeReturns the score mode to use on searchesMethods inherited from class org.elasticsearch.compute.lucene.LuceneQueryEvaluator
close, executeQueryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.core.Releasable
close
-
Method Details
-
eval
Description copied from interface:EvalOperator.ExpressionEvaluatorEvaluate the expression.- Specified by:
evalin interfaceEvalOperator.ExpressionEvaluator- Returns:
- the returned Block has its own reference and the caller is responsible for releasing it.
-
scoreMode
protected org.apache.lucene.search.ScoreMode scoreMode()Description copied from class:LuceneQueryEvaluatorReturns the score mode to use on searches- Specified by:
scoreModein classLuceneQueryEvaluator<BooleanVector.Builder>
-
createNoMatchVector
Description copied from class:LuceneQueryEvaluatorCreates a vector where all positions correspond to elements that don't match the query- Specified by:
createNoMatchVectorin classLuceneQueryEvaluator<BooleanVector.Builder>
-
createVectorBuilder
Description copied from class:LuceneQueryEvaluatorCreates the corresponding vector builder to store the results of evaluating the query- Specified by:
createVectorBuilderin classLuceneQueryEvaluator<BooleanVector.Builder>
-
appendNoMatch
Description copied from class:LuceneQueryEvaluatorAppends a non matching result to a builder created by @link createVectorBuilder}- Specified by:
appendNoMatchin classLuceneQueryEvaluator<BooleanVector.Builder>
-
appendMatch
protected void appendMatch(BooleanVector.Builder builder, org.apache.lucene.search.Scorable scorer) throws IOException Description copied from class:LuceneQueryEvaluatorAppends a matching result to a builder created by @link createVectorBuilder}- Specified by:
appendMatchin classLuceneQueryEvaluator<BooleanVector.Builder>- Throws:
IOException
-