Class BulkKeywordLookup

java.lang.Object
org.elasticsearch.compute.operator.lookup.BulkKeywordLookup

public class BulkKeywordLookup extends Object
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 Details

    • BulkKeywordLookup

      public BulkKeywordLookup(String rightFieldName, 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

      public int getPositionCount(Page inputPage)
    • getExtractChannelOffset

      public int getExtractChannelOffset()
    • initializeCaches

      public void initializeCaches(org.apache.lucene.index.IndexReader indexReader) throws IOException
      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