Module org.elasticsearch.server
Interface PartitionedDocValues
- All Known Implementing Classes:
AbstractTSDBDocValuesProducer.BaseSortedDocValues
public interface PartitionedDocValues
An extension for doc-values which is the primary sort key, and values are grouped by some prefix bytes. One example is `_tsid` in
time-series, where time-series can be grouped by the first few bytes, and the query engine can process a slice of time-series
containing all "continuous" time-series sharing the same prefix. This is necessary instead of querying a slice of docs because some
aggregations such as rate require all data points from a single time-series to be processed by the same operator.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanPartitionByTsidPrefix(org.apache.lucene.search.IndexSearcher searcher) Check if the given index searcher can be partitioned by tsid prefix.intThe number of bits used in prefix partitionsReturns the prefixed partition from the doc-values of this field if exists.
-
Method Details
-
prefixPartitions
@Nullable PartitionedDocValues.PrefixPartitions prefixPartitions(PartitionedDocValues.PrefixPartitions reused) throws IOException Returns the prefixed partition from the doc-values of this field if exists.- Parameters:
reused- an existing prefix partitions can be reused to avoid allocating memory- Throws:
IOException
-
prefixPartitionBits
int prefixPartitionBits()The number of bits used in prefix partitions -
canPartitionByTsidPrefix
static boolean canPartitionByTsidPrefix(org.apache.lucene.search.IndexSearcher searcher) throws IOException Check if the given index searcher can be partitioned by tsid prefix.- Parameters:
searcher- the index searcher to check- Returns:
- true if all non-empty segments support tsid prefix partitioning
- Throws:
IOException
-