mod condition_converter;
mod filtering;
mod optimizer;
mod payload_index_read;
mod value_retriever;
#[cfg(test)]
#[cfg(feature = "testing")]
mod tests;
use std::collections::HashMap;
use std::sync::Arc;
use atomic_refcell::AtomicRefCell;
use crate::segment::id_tracker::IdTrackerRead;
use crate::segment::index::field_index::FieldIndexRead;
use crate::segment::index::payload_config::PayloadConfig;
use crate::segment::index::visited_pool::VisitedPool;
use crate::segment::payload_storage::PayloadStorageRead;
use crate::segment::types::{PayloadKeyType, VectorNameBuf};
use crate::segment::vector_storage::VectorStorageRead;
pub struct StructPayloadIndexReadView<'a, P, I, V, F>
where
P: PayloadStorageRead,
I: IdTrackerRead,
V: VectorStorageRead,
F: FieldIndexRead,
{
pub(crate) payload: &'a Arc<AtomicRefCell<P>>,
pub(crate) id_tracker: &'a I,
pub(crate) vector_storages: &'a HashMap<VectorNameBuf, Arc<AtomicRefCell<V>>>,
pub(crate) field_indexes: &'a HashMap<PayloadKeyType, Vec<F>>,
pub(crate) config: &'a PayloadConfig,
pub(crate) visited_pool: &'a VisitedPool,
}
impl<'a, P, I, V, F> StructPayloadIndexReadView<'a, P, I, V, F>
where
P: PayloadStorageRead,
I: IdTrackerRead,
V: VectorStorageRead,
F: FieldIndexRead,
{
pub fn available_point_count(&self) -> usize {
self.id_tracker.available_point_count()
}
}