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(String rightFieldName, 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 as necessary.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
-
-
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 as necessary. The current thread is tracked because Lucene only allows TermsEnum and PostingsEnum to be used from the thread that creates them. Note: postingsCache[i] filled in processQuery.- Throws:
IOException
-