Class LuceneSliceQueue

java.lang.Object
org.elasticsearch.compute.lucene.LuceneSliceQueue

public final class LuceneSliceQueue extends Object
Shared Lucene slices between Lucene operators.

Each shard is built with a list of queries to run and tags to add to the queries (List<QueryAndTags>). Some examples:

  • For queries like FROM foo we'll use a one element list containing match_all, []. It loads all documents in the index and append no extra fields to the loaded documents.
  • For queries like FROM foo | WHERE a > 10 we'll use a one element list containing +single_value(a) +(a > 10), []. It loads all documents where a is single valued and greater than 10.
  • For queries like FROM foo | STATS MAX(b) BY ROUND_TO(a, 0, 100) we'll use a two element list containing
    • +single_value(a) +(a < 100), [0]
    • +single_value(a) +(a >= 100), [100]
    It loads all documents in the index where a is single valued and adds a constant 0 to the documents where a < 100 and the constant 100 to the documents where a >= 100.

IMPORTANT: Runners make no effort to deduplicate the results from multiple queries. If you need to only see each document one time then make sure the queries are mutually exclusive.