Class DocIdSliceQuery

java.lang.Object
org.apache.lucene.search.Query
org.elasticsearch.search.slice.SliceQuery
org.elasticsearch.search.slice.DocIdSliceQuery

public final class DocIdSliceQuery extends SliceQuery
A SliceQuery that partitions documents based on their Lucene ID. To take advantage of locality, each slice holds a contiguous range of document IDs. NOTE: Because the query relies on Lucene document IDs, it is not stable across readers. It's intended for scenarios where the reader doesn't change, like in a point-in-time search.
  • Constructor Details

    • DocIdSliceQuery

      public DocIdSliceQuery(int id, int max)
      Parameters:
      id - The id of the slice
      max - The maximum number of slices
  • Method Details

    • createWeight

      public org.apache.lucene.search.Weight createWeight(org.apache.lucene.search.IndexSearcher searcher, org.apache.lucene.search.ScoreMode scoreMode, float boost) throws IOException
      Overrides:
      createWeight in class org.apache.lucene.search.Query
      Throws:
      IOException