Module org.elasticsearch.compute
Class BulkKeywordLookup
java.lang.Object
org.elasticsearch.compute.operator.lookup.BulkKeywordLookup
Helper class used in lookup joins.
The
processQuery() method searches a field in a Lucene index
for documents containing a given term. Positions, segments and docs
of the matches are gathered into IntVector.Builders.-
Constructor Summary
ConstructorsConstructorDescriptionBulkKeywordLookup(MappedFieldType rightFieldType, int matchChannelOffset, int extractChannelOffset, Warnings warnings) -
Method Summary
Modifier and TypeMethodDescriptionintintgetPositionCount(Page inputPage) voidinitializeCaches(org.apache.lucene.index.IndexReader indexReader) Initialize caches for the given index reader.intprocessQuery(Page inputPage, int position, org.apache.lucene.index.IndexReader indexReader, IntVector.Builder docsBuilder, IntVector.Builder segmentsBuilder, IntVector.Builder positionsBuilder) Process a single query at the given position using direct Lucene index access.
-
Constructor Details
-
BulkKeywordLookup
public BulkKeywordLookup(MappedFieldType rightFieldType, int matchChannelOffset, int extractChannelOffset, Warnings warnings)
-
-
Method Details
-
processQuery
public int processQuery(Page inputPage, int position, org.apache.lucene.index.IndexReader indexReader, IntVector.Builder docsBuilder, IntVector.Builder segmentsBuilder, IntVector.Builder positionsBuilder) Process a single query at the given position using direct Lucene index access. This method bypasses Lucene's query framework entirely and directly accesses the inverted index using TermsEnum and PostingsEnum for maximum performance. -
getPositionCount
-
getExtractChannelOffset
public int getExtractChannelOffset() -
initializeCaches
Initialize caches for the given index reader. This should be called once before the first processQuery call for a given index reader.- Throws:
IOException
-