Module org.elasticsearch.compute
Package org.elasticsearch.compute.lucene
Class LuceneQueryExpressionEvaluator
java.lang.Object
org.elasticsearch.compute.lucene.LuceneQueryEvaluator<BooleanBlock.Builder>
org.elasticsearch.compute.lucene.LuceneQueryExpressionEvaluator
- All Implemented Interfaces:
Closeable,AutoCloseable,EvalOperator.ExpressionEvaluator,org.elasticsearch.core.Releasable
public class LuceneQueryExpressionEvaluator
extends LuceneQueryEvaluator<BooleanBlock.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 -
Field Summary
Fields inherited from class org.elasticsearch.compute.lucene.LuceneQueryEvaluator
shards -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendMatch(BooleanBlock.Builder builder, org.apache.lucene.search.Scorable scorer) Appends a matching result to a builder created by @link createVectorBuilder}protected voidappendNoMatch(BooleanBlock.Builder builder) Appends a non matching result to a builder created by @link createVectorBuilder}longHeap used by the evaluator excluding any memory that's separately tracked like theBreakingBytesRefBuilderused for string concat.protected BooleanBlock.BuildercreateBlockBuilder(BlockFactory blockFactory, int size) Creates the corresponding vector builder to store the results of evaluating the queryprotected BlockcreateNoMatchBlock(BlockFactory blockFactory, int size) Creates a vector where all positions correspond to elements that don't match 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<BooleanBlock.Builder>
-
createNoMatchBlock
Description copied from class:LuceneQueryEvaluatorCreates a vector where all positions correspond to elements that don't match the query- Specified by:
createNoMatchBlockin classLuceneQueryEvaluator<BooleanBlock.Builder>
-
createBlockBuilder
Description copied from class:LuceneQueryEvaluatorCreates the corresponding vector builder to store the results of evaluating the query- Specified by:
createBlockBuilderin classLuceneQueryEvaluator<BooleanBlock.Builder>
-
appendNoMatch
Description copied from class:LuceneQueryEvaluatorAppends a non matching result to a builder created by @link createVectorBuilder}- Specified by:
appendNoMatchin classLuceneQueryEvaluator<BooleanBlock.Builder>
-
appendMatch
protected void appendMatch(BooleanBlock.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<BooleanBlock.Builder>- Throws:
IOException
-
baseRamBytesUsed
public long baseRamBytesUsed()Description copied from interface:EvalOperator.ExpressionEvaluatorHeap used by the evaluator excluding any memory that's separately tracked like theBreakingBytesRefBuilderused for string concat.- Specified by:
baseRamBytesUsedin interfaceEvalOperator.ExpressionEvaluator
-