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 Summary

    Constructors
    Constructor
    Description
    DocIdSliceQuery(int id, int max)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.lucene.search.Weight
    createWeight(org.apache.lucene.search.IndexSearcher searcher, org.apache.lucene.search.ScoreMode scoreMode, float boost)
     

    Methods inherited from class org.elasticsearch.search.slice.SliceQuery

    contains, equals, getField, getId, getMax, hashCode, toString

    Methods inherited from class org.apache.lucene.search.Query

    classHash, rewrite, sameClassAs, toString, visit

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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