pub struct PersistentQueryIndex { /* private fields */ }Expand description
Immutable query directory for a set of sealed structural blocks.
Implementations§
Source§impl PersistentQueryIndex
impl PersistentQueryIndex
Sourcepub fn from_blocks(
blocks: Vec<(QueryBlockMetadata, BlockQueryIndex)>,
) -> TelemetryResult<Self>
pub fn from_blocks( blocks: Vec<(QueryBlockMetadata, BlockQueryIndex)>, ) -> TelemetryResult<Self>
Builds one immutable directory from block-local exact postings.
Sourcepub fn blocks(&self) -> &[QueryBlockMetadata]
pub fn blocks(&self) -> &[QueryBlockMetadata]
Returns the immutable block directory.
Sourcepub fn posting_storage_bytes(&self) -> usize
pub fn posting_storage_bytes(&self) -> usize
Heap bytes occupied by record-ordinal arrays and run tables.
This excludes hash-table buckets and interned term/field strings.
Sourcepub fn message_trigram_filter_bytes(&self) -> usize
pub fn message_trigram_filter_bytes(&self) -> usize
Heap bytes occupied by block-level message trigram rejection filters.
Sourcepub fn posting_cardinality(&self) -> usize
pub fn posting_cardinality(&self) -> usize
Logical number of record ordinals represented by all postings.
Sourcepub fn candidate_hits(&self, query: &LogQuery) -> Vec<QueryHit>
pub fn candidate_hits(&self, query: &LogQuery) -> Vec<QueryHit>
Plans safe term/field candidates before payload reads and decoding.
Posting-only queries may return exact hits. Queries containing residual
predicates return a superset. Always pass decoded records through
LogQuery::select before returning them to a caller. Offset and
timestamp ranges prune whole blocks here, while boundary records are
checked after selective decoding. A limit is applied during planning
only when the complete query can be answered safely by postings.
Sourcepub fn candidate_blocks(&self, query: &LogQuery) -> Vec<u32>
pub fn candidate_blocks(&self, query: &LogQuery) -> Vec<u32>
Returns candidate block ordinals in deterministic offset order.
This is the bounded entry point for sealed queries that require
post-decode filtering. Call Self::candidate_hits_in_block for one
returned block at a time, decode and filter those records, and stop once
an offset-ordered page is complete.
Sourcepub fn candidate_hits_in_block(
&self,
query: &LogQuery,
block_ordinal: u32,
) -> Vec<QueryHit>
pub fn candidate_hits_in_block( &self, query: &LogQuery, block_ordinal: u32, ) -> Vec<QueryHit>
Plans the unbounded candidate records inside one selected block.
This method deliberately ignores the query’s global limit. The caller
must decode these candidates, apply LogQuery::matches, and enforce
the limit only after residual filtering.
Sourcepub fn encode(&self) -> TelemetryResult<Vec<u8>>
pub fn encode(&self) -> TelemetryResult<Vec<u8>>
Encodes the complete immutable directory with hybrid delta/run postings.
Sourcepub fn decode(encoded: &[u8]) -> TelemetryResult<Self>
pub fn decode(encoded: &[u8]) -> TelemetryResult<Self>
Decodes and validates one immutable query directory.
Sourcepub fn encode_compressed(&self, level: i32) -> TelemetryResult<Vec<u8>>
pub fn encode_compressed(&self, level: i32) -> TelemetryResult<Vec<u8>>
Encodes and wraps the query directory in one zstd frame.
Sourcepub fn decode_compressed(encoded: &[u8]) -> TelemetryResult<Self>
pub fn decode_compressed(encoded: &[u8]) -> TelemetryResult<Self>
Decodes a zstd-wrapped immutable query directory.
Trait Implementations§
Source§impl Clone for PersistentQueryIndex
impl Clone for PersistentQueryIndex
Source§impl Debug for PersistentQueryIndex
impl Debug for PersistentQueryIndex
impl Eq for PersistentQueryIndex
Source§impl PartialEq for PersistentQueryIndex
impl PartialEq for PersistentQueryIndex
impl StructuralPartialEq for PersistentQueryIndex
Auto Trait Implementations§
impl Freeze for PersistentQueryIndex
impl RefUnwindSafe for PersistentQueryIndex
impl Send for PersistentQueryIndex
impl Sync for PersistentQueryIndex
impl Unpin for PersistentQueryIndex
impl UnsafeUnpin for PersistentQueryIndex
impl UnwindSafe for PersistentQueryIndex
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request