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(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

      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. This should be called once before the first processQuery call for a given index reader.
      Throws:
      IOException