repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/payload_storage/in_memory_payload_storage_impl.rs
lib/segment/src/payload_storage/in_memory_payload_storage_impl.rs
use std::path::PathBuf; use common::counter::hardware_counter::HardwareCounterCell; use common::types::PointOffsetType; use serde_json::Value; use crate::common::Flusher; use crate::common::operation_error::OperationResult; use crate::json_path::JsonPath; use crate::payload_storage::PayloadStorage; use crate::payload...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/payload_storage/in_memory_payload_storage.rs
lib/segment/src/payload_storage/in_memory_payload_storage.rs
use ahash::AHashMap; use common::types::PointOffsetType; use crate::types::Payload; /// Same as `SimplePayloadStorage` but without persistence /// Warn: for tests only #[derive(Debug, Default)] pub struct InMemoryPayloadStorage { pub(crate) payload: AHashMap<PointOffsetType, Payload>, } impl InMemoryPayloadStora...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/payload_storage/mod.rs
lib/segment/src/payload_storage/mod.rs
pub mod condition_checker; #[cfg(feature = "testing")] pub mod in_memory_payload_storage; #[cfg(feature = "testing")] pub mod in_memory_payload_storage_impl; pub mod mmap_payload_storage; #[cfg(feature = "rocksdb")] pub mod on_disk_payload_storage; mod payload_storage_base; pub mod payload_storage_enum; pub mod query_c...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/payload_storage/simple_payload_storage.rs
lib/segment/src/payload_storage/simple_payload_storage.rs
use std::sync::Arc; use ahash::AHashMap; use common::counter::hardware_counter::HardwareCounterCell; use common::types::PointOffsetType; use parking_lot::RwLock; use rocksdb::DB; use crate::common::operation_error::{OperationError, OperationResult}; use crate::common::rocksdb_buffered_delete_wrapper::DatabaseColumnSc...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/payload_storage/on_disk_payload_storage.rs
lib/segment/src/payload_storage/on_disk_payload_storage.rs
use std::path::PathBuf; use std::sync::Arc; use common::counter::hardware_counter::HardwareCounterCell; use common::types::PointOffsetType; use parking_lot::RwLock; use rocksdb::DB; use serde_json::Value; use crate::common::Flusher; use crate::common::operation_error::{OperationError, OperationResult}; use crate::com...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/payload_storage/query_checker.rs
lib/segment/src/payload_storage/query_checker.rs
#![cfg_attr(not(feature = "testing"), allow(unused_imports))] use std::cell::RefCell; use std::collections::HashMap; use std::ops::Deref; use std::sync::Arc; use atomic_refcell::AtomicRefCell; use common::counter::hardware_counter::HardwareCounterCell; use common::types::PointOffsetType; use crate::common::utils::{I...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/payload_storage/mmap_payload_storage.rs
lib/segment/src/payload_storage/mmap_payload_storage.rs
use std::path::{Path, PathBuf}; use common::counter::hardware_counter::HardwareCounterCell; use common::types::PointOffsetType; use fs_err as fs; use gridstore::config::StorageOptions; use gridstore::{Blob, Gridstore}; use serde_json::Value; use crate::common::Flusher; use crate::common::operation_error::{OperationEr...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/payload_storage/payload_storage_enum.rs
lib/segment/src/payload_storage/payload_storage_enum.rs
use std::path::PathBuf; use common::counter::hardware_counter::HardwareCounterCell; use common::types::PointOffsetType; use serde_json::Value; use crate::common::Flusher; use crate::common::operation_error::OperationResult; use crate::json_path::JsonPath; use crate::payload_storage::PayloadStorage; #[cfg(feature = "t...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/chunked_vector_storage.rs
lib/segment/src/vector_storage/chunked_vector_storage.rs
use std::mem::MaybeUninit; use std::path::PathBuf; use common::counter::hardware_counter::HardwareCounterCell; use crate::common::Flusher; use crate::common::operation_error::OperationResult; use crate::vector_storage::AccessPattern; /// In case of simple vector storage, vector offset is the same as PointOffsetType....
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/async_io_mock.rs
lib/segment/src/vector_storage/async_io_mock.rs
#![allow(dead_code)] // The mock is unused on Linux, and so produces dead code warnings use fs_err::File; use crate::common::operation_error::OperationResult; use crate::data_types::primitive::PrimitiveVectorElement; // This is a mock implementation of the async_io module for those platforms that don't support io_ur...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/async_raw_scorer.rs
lib/segment/src/vector_storage/async_raw_scorer.rs
use common::counter::hardware_counter::HardwareCounterCell; use common::types::{PointOffsetType, ScoreType}; use super::query::{ ContextQuery, DiscoveryQuery, RecoBestScoreQuery, RecoQuery, RecoSumScoresQuery, TransformInto, }; use super::query_scorer::custom_query_scorer::CustomQueryScorer; use super::query_score...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/in_ram_persisted_vectors.rs
lib/segment/src/vector_storage/in_ram_persisted_vectors.rs
use std::mem::MaybeUninit; use std::path::{Path, PathBuf}; use common::counter::hardware_counter::HardwareCounterCell; use memory::madvise::{Advice, AdviceSetting}; use crate::common::Flusher; use crate::common::operation_error::OperationResult; use crate::vector_storage::AccessPattern; use crate::vector_storage::chu...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/bitvec.rs
lib/segment/src/vector_storage/bitvec.rs
use bitvec::vec::BitVec; use common::types::PointOffsetType; /// Set deleted state in given bitvec. /// /// Grows bitvec automatically if it is not big enough. /// /// Returns previous deleted state of the given point. #[inline] pub fn bitvec_set_deleted(bitvec: &mut BitVec, point_id: PointOffsetType, deleted: bool) -...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/vector_storage_base.rs
lib/segment/src/vector_storage/vector_storage_base.rs
use std::alloc::Layout; use std::mem::MaybeUninit; use std::ops::Range; use std::path::PathBuf; use std::sync::atomic::AtomicBool; use bitvec::prelude::BitSlice; use common::counter::hardware_counter::HardwareCounterCell; use common::maybe_uninit::maybe_uninit_fill_from; use common::types::PointOffsetType; use sparse:...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
true
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/mod.rs
lib/segment/src/vector_storage/mod.rs
#[cfg(target_os = "linux")] pub mod async_raw_scorer; mod chunked_mmap_vectors; pub mod chunked_vectors; pub mod quantized; pub mod raw_scorer; mod vector_storage_base; #[cfg(test)] mod tests; #[cfg(target_os = "linux")] mod async_io; mod async_io_mock; mod bitvec; pub mod chunked_vector_storage; pub mod common; pub ...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/chunked_mmap_vectors.rs
lib/segment/src/vector_storage/chunked_mmap_vectors.rs
use std::cmp::max; use std::io::BufReader; use std::mem::MaybeUninit; use std::path::{Path, PathBuf}; use common::counter::hardware_counter::HardwareCounterCell; use common::maybe_uninit::maybe_uninit_fill_from; use fs_err as fs; use fs_err::File; use io::file_operations::atomic_save_json; use memmap2::MmapMut; use me...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/common.rs
lib/segment/src/vector_storage/common.rs
use std::sync::atomic::{AtomicBool, Ordering}; #[cfg(feature = "rocksdb")] use serde::{Deserialize, Serialize}; static ASYNC_SCORER: AtomicBool = AtomicBool::new(false); pub fn set_async_scorer(async_scorer: bool) { ASYNC_SCORER.store(async_scorer, Ordering::Relaxed); } pub fn get_async_scorer() -> bool { A...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/raw_scorer.rs
lib/segment/src/vector_storage/raw_scorer.rs
use std::sync::atomic::AtomicBool; use bitvec::prelude::BitSlice; use common::counter::hardware_counter::HardwareCounterCell; use common::ext::BitSliceExt as _; use common::types::{PointOffsetType, ScoreType}; use sparse::common::sparse_vector::SparseVector; use super::query::{ ContextQuery, DiscoveryQuery, RecoB...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/chunked_vectors.rs
lib/segment/src/vector_storage/chunked_vectors.rs
use std::cmp::max; use std::collections::TryReserveError; use std::mem; use crate::common::vector_utils::{TrySetCapacity, TrySetCapacityExact}; use crate::vector_storage::chunked_vector_storage::VectorOffsetType; use crate::vector_storage::common::CHUNK_SIZE; #[derive(Debug)] pub struct ChunkedVectors<T> { /// Ve...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/async_io.rs
lib/segment/src/vector_storage/async_io.rs
use std::fmt; use std::os::fd::AsRawFd; use common::types::PointOffsetType; use fs_err::File; use io_uring::{IoUring, opcode, types}; use memory::mmap_ops::transmute_from_u8_to_slice; use crate::common::operation_error::{OperationError, OperationResult}; use crate::data_types::primitive::PrimitiveVectorElement; cons...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/multi_dense/simple_multi_dense_vector_storage.rs
lib/segment/src/vector_storage/multi_dense/simple_multi_dense_vector_storage.rs
use std::fmt; use std::ops::Range; use std::sync::Arc; use std::sync::atomic::AtomicBool; use bitvec::prelude::{BitSlice, BitVec}; use common::counter::hardware_counter::HardwareCounterCell; use common::ext::BitSliceExt as _; use common::types::PointOffsetType; use parking_lot::RwLock; use rocksdb::DB; use crate::com...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/multi_dense/mod.rs
lib/segment/src/vector_storage/multi_dense/mod.rs
pub mod appendable_mmap_multi_dense_vector_storage; #[cfg(feature = "rocksdb")] pub mod simple_multi_dense_vector_storage; pub mod volatile_multi_dense_vector_storage;
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/multi_dense/volatile_multi_dense_vector_storage.rs
lib/segment/src/vector_storage/multi_dense/volatile_multi_dense_vector_storage.rs
use std::fmt; use std::ops::Range; use std::sync::atomic::AtomicBool; use bitvec::prelude::{BitSlice, BitVec}; use common::counter::hardware_counter::HardwareCounterCell; use common::ext::BitSliceExt as _; use common::types::PointOffsetType; use crate::common::Flusher; use crate::common::operation_error::{OperationEr...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/multi_dense/appendable_mmap_multi_dense_vector_storage.rs
lib/segment/src/vector_storage/multi_dense/appendable_mmap_multi_dense_vector_storage.rs
use std::ops::Range; use std::path::{Path, PathBuf}; use std::sync::atomic::AtomicBool; use bitvec::prelude::BitSlice; use common::counter::hardware_counter::HardwareCounterCell; use common::types::PointOffsetType; use fs_err as fs; use memory::madvise::AdviceSetting; use crate::common::Flusher; use crate::common::fl...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/quantized/quantized_multivector_storage.rs
lib/segment/src/vector_storage/quantized/quantized_multivector_storage.rs
use std::ops::DerefMut; use std::path::{Path, PathBuf}; use common::counter::hardware_counter::HardwareCounterCell; use common::typelevel::False; use common::types::{PointOffsetType, ScoreType}; use fs_err as fs; use memmap2::MmapMut; use memory::madvise::{Advice, AdviceSetting}; use memory::mmap_type::{MmapFlusher, M...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/quantized/quantized_query_scorer.rs
lib/segment/src/vector_storage/quantized/quantized_query_scorer.rs
use std::borrow::Cow; use common::counter::hardware_counter::HardwareCounterCell; use common::types::{PointOffsetType, ScoreType}; use crate::data_types::primitive::PrimitiveVectorElement; use crate::data_types::vectors::{DenseVector, VectorElementType}; use crate::spaces::metric::Metric; use crate::types::Quantizati...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/quantized/quantized_multi_custom_query_scorer.rs
lib/segment/src/vector_storage/quantized/quantized_multi_custom_query_scorer.rs
use std::marker::PhantomData; use common::counter::hardware_counter::HardwareCounterCell; use common::typelevel::False; use common::types::{PointOffsetType, ScoreType}; use crate::data_types::named_vectors::CowMultiVector; use crate::data_types::primitive::PrimitiveVectorElement; use crate::data_types::vectors::{Mult...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/quantized/mod.rs
lib/segment/src/vector_storage/quantized/mod.rs
mod quantized_chunked_mmap_storage; mod quantized_custom_query_scorer; mod quantized_mmap_storage; mod quantized_multi_custom_query_scorer; mod quantized_multi_query_scorer; pub mod quantized_multivector_storage; pub mod quantized_query_scorer; mod quantized_ram_storage; mod quantized_scorer_builder; pub mod quantized_...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/quantized/quantized_mmap_storage.rs
lib/segment/src/vector_storage/quantized/quantized_mmap_storage.rs
use std::num::NonZeroUsize; use std::path::{Path, PathBuf}; use common::counter::hardware_counter::HardwareCounterCell; use common::types::PointOffsetType; use fs_err as fs; use fs_err::OpenOptions; use memmap2::{Mmap, MmapMut}; use memory::madvise; use memory::madvise::Madviseable; use memory::mmap_type::MmapFlusher;...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/quantized/quantized_scorer_builder.rs
lib/segment/src/vector_storage/quantized/quantized_scorer_builder.rs
use common::counter::hardware_counter::HardwareCounterCell; use quantization::EncodedVectors; use super::quantized_custom_query_scorer::QuantizedCustomQueryScorer; use super::quantized_query_scorer::QuantizedQueryScorer; use super::quantized_vectors::QuantizedVectorStorage; use crate::common::operation_error::Operatio...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/quantized/quantized_chunked_mmap_storage.rs
lib/segment/src/vector_storage/quantized/quantized_chunked_mmap_storage.rs
use std::path::{Path, PathBuf}; use common::counter::hardware_counter::HardwareCounterCell; use common::types::PointOffsetType; use memory::madvise::{Advice, AdviceSetting}; use memory::mmap_type::MmapFlusher; use crate::common::operation_error::OperationResult; use crate::vector_storage::Random; use crate::vector_st...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/quantized/quantized_vectors.rs
lib/segment/src/vector_storage/quantized/quantized_vectors.rs
use std::alloc::Layout; use std::fmt; use std::path::{Path, PathBuf}; use std::sync::atomic::AtomicBool; use common::counter::hardware_counter::HardwareCounterCell; use common::types::PointOffsetType; use io::file_operations::{atomic_save_json, read_json}; use memory::fadvise::clear_disk_cache; use quantization::encod...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
true
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/quantized/quantized_ram_storage.rs
lib/segment/src/vector_storage/quantized/quantized_ram_storage.rs
use std::io::{BufReader, BufWriter, Read, Write}; use std::path::{Path, PathBuf}; use common::counter::hardware_counter::HardwareCounterCell; use common::types::PointOffsetType; use fs_err as fs; use fs_err::File; use memory::fadvise::OneshotFile; use memory::mmap_type::MmapFlusher; use crate::common::operation_error...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/quantized/quantized_custom_query_scorer.rs
lib/segment/src/vector_storage/quantized/quantized_custom_query_scorer.rs
use std::borrow::Cow; use std::marker::PhantomData; use common::counter::hardware_counter::HardwareCounterCell; use common::types::{PointOffsetType, ScoreType}; use crate::data_types::primitive::PrimitiveVectorElement; use crate::data_types::vectors::{DenseVector, TypedDenseVector}; use crate::spaces::metric::Metric;...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/quantized/quantized_multi_query_scorer.rs
lib/segment/src/vector_storage/quantized/quantized_multi_query_scorer.rs
use std::borrow::Cow; use std::marker::PhantomData; use common::counter::hardware_counter::HardwareCounterCell; use common::typelevel::False; use common::types::{PointOffsetType, ScoreType}; use crate::data_types::primitive::PrimitiveVectorElement; use crate::data_types::vectors::MultiDenseVectorInternal; use crate::...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/query/discovery_query.rs
lib/segment/src/vector_storage/query/discovery_query.rs
use std::hash::Hash; use std::iter; use common::math::scaled_fast_sigmoid; use common::types::ScoreType; use itertools::Itertools; use serde::Serialize; use super::context_query::ContextPair; use super::{Query, TransformInto}; use crate::common::operation_error::OperationResult; use crate::data_types::vectors::{Query...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/query/feedback_query.rs
lib/segment/src/vector_storage/query/feedback_query.rs
use std::hash::Hash; use common::types::ScoreType; use itertools::Itertools; use ordered_float::OrderedFloat; use serde::Serialize; use super::{Query, TransformInto}; use crate::common::operation_error::OperationResult; const DEFAULT_MAX_PAIRS: usize = 3; #[derive(Clone, Debug, Serialize, Hash, PartialEq)] pub stru...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/query/mod.rs
lib/segment/src/vector_storage/query/mod.rs
use common::types::ScoreType; use crate::common::operation_error::{OperationError, OperationResult}; use crate::data_types::vectors::DenseVector; mod context_query; mod discovery_query; mod feedback_query; mod reco_query; pub use context_query::{ContextPair, ContextQuery}; pub use discovery_query::DiscoveryQuery; pu...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/query/context_query.rs
lib/segment/src/vector_storage/query/context_query.rs
use std::hash::Hash; use std::iter::{self, Chain, Once}; use common::math::fast_sigmoid; use common::types::ScoreType; use itertools::Itertools; use serde::Serialize; use super::{Query, TransformInto}; use crate::common::operation_error::OperationResult; use crate::data_types::vectors::{QueryVector, VectorInternal}; ...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/query/reco_query.rs
lib/segment/src/vector_storage/query/reco_query.rs
use std::hash::Hash; use common::math::scaled_fast_sigmoid; use common::types::ScoreType; use itertools::Itertools; use serde::Serialize; use super::{Query, TransformInto}; use crate::common::operation_error::OperationResult; use crate::data_types::vectors::{QueryVector, VectorInternal}; #[derive(Debug, Clone, Parti...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/tests/custom_query_scorer_equivalency.rs
lib/segment/src/vector_storage/tests/custom_query_scorer_equivalency.rs
use std::collections::HashSet; use std::path::Path; use std::sync::atomic::AtomicBool; use std::{error, result}; use common::counter::hardware_counter::HardwareCounterCell; use common::types::PointOffsetType; use itertools::Itertools; use rand::rngs::StdRng; use rand::seq::IteratorRandom; use rand::{Rng, SeedableRng};...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/tests/async_raw_scorer.rs
lib/segment/src/vector_storage/tests/async_raw_scorer.rs
use bitvec::slice::BitSlice; use common::counter::hardware_counter::HardwareCounterCell; use common::types::PointOffsetType; use itertools::Itertools; use rand::SeedableRng as _; use rand::seq::IteratorRandom as _; use super::utils::{Result, delete_random_vectors, insert_distributed_vectors, sampler}; use crate::data_...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/tests/utils.rs
lib/segment/src/vector_storage/tests/utils.rs
use std::{error, result}; use common::counter::hardware_counter::HardwareCounterCell; use rand::seq::IteratorRandom; use crate::data_types::vectors::VectorElementType; use crate::id_tracker::IdTracker; use crate::vector_storage::{VectorStorage, VectorStorageEnum}; pub type Result<T, E = Error> = result::Result<T, E>...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/tests/mod.rs
lib/segment/src/vector_storage/tests/mod.rs
#[cfg(target_os = "linux")] mod async_raw_scorer; mod custom_query_scorer_equivalency; mod test_appendable_dense_vector_storage; mod test_appendable_multi_dense_vector_storage; mod test_appendable_sparse_vector_storage; mod utils;
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/tests/test_appendable_sparse_vector_storage.rs
lib/segment/src/vector_storage/tests/test_appendable_sparse_vector_storage.rs
use std::path::Path; use std::sync::Arc; #[cfg(feature = "rocksdb")] use std::sync::atomic::AtomicBool; use atomic_refcell::AtomicRefCell; use common::counter::hardware_counter::HardwareCounterCell; use common::types::PointOffsetType; use itertools::Itertools; use sparse::common::sparse_vector::SparseVector; use tempf...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/tests/test_appendable_multi_dense_vector_storage.rs
lib/segment/src/vector_storage/tests/test_appendable_multi_dense_vector_storage.rs
use std::path::Path; use std::sync::Arc; use atomic_refcell::AtomicRefCell; use common::counter::hardware_counter::HardwareCounterCell; use common::types::PointOffsetType; use common::validation::MAX_MULTIVECTOR_FLATTENED_LEN; use rstest::rstest; use tempfile::Builder; use crate::data_types::vectors::{ MultiDense...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/tests/test_appendable_dense_vector_storage.rs
lib/segment/src/vector_storage/tests/test_appendable_dense_vector_storage.rs
use std::sync::Arc; use std::sync::atomic::AtomicBool; use atomic_refcell::AtomicRefCell; use common::counter::hardware_counter::HardwareCounterCell; use common::types::PointOffsetType; use itertools::Itertools; use tempfile::Builder; #[cfg(feature = "rocksdb")] use crate::common::rocksdb_wrapper::{DB_VECTOR_CF, open...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/sparse/simple_sparse_vector_storage.rs
lib/segment/src/vector_storage/sparse/simple_sparse_vector_storage.rs
use std::ops::Range; use std::sync::Arc; use std::sync::atomic::AtomicBool; use bitvec::prelude::{BitSlice, BitVec}; use common::counter::hardware_counter::HardwareCounterCell; use common::ext::BitSliceExt as _; use common::types::PointOffsetType; use parking_lot::RwLock; use rocksdb::DB; use sparse::common::sparse_ve...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/sparse/mmap_sparse_vector_storage.rs
lib/segment/src/vector_storage/sparse/mmap_sparse_vector_storage.rs
use std::ops::Range; use std::path::{Path, PathBuf}; use std::sync::atomic::AtomicBool; use bitvec::slice::BitSlice; use common::counter::hardware_counter::HardwareCounterCell; use common::iterator_ext::IteratorExt; use common::types::PointOffsetType; use fs_err as fs; use gridstore::Gridstore; use gridstore::config::...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/sparse/volatile_sparse_vector_storage.rs
lib/segment/src/vector_storage/sparse/volatile_sparse_vector_storage.rs
use std::ops::Range; use std::sync::atomic::AtomicBool; use bitvec::prelude::{BitSlice, BitVec}; use common::counter::hardware_counter::HardwareCounterCell; use common::ext::BitSliceExt as _; use common::types::PointOffsetType; use sparse::common::sparse_vector::SparseVector; use sparse::common::types::{DimId, DimWeig...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/sparse/mod.rs
lib/segment/src/vector_storage/sparse/mod.rs
pub mod mmap_sparse_vector_storage; #[cfg(feature = "rocksdb")] pub mod simple_sparse_vector_storage; mod stored_sparse_vectors; pub mod volatile_sparse_vector_storage; use crate::types::Distance; pub const SPARSE_VECTOR_DISTANCE: Distance = Distance::Dot;
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/sparse/stored_sparse_vectors.rs
lib/segment/src/vector_storage/sparse/stored_sparse_vectors.rs
use common::delta_pack::{delta_pack, delta_unpack}; use gridstore::Blob; use serde::{Deserialize, Serialize}; use sparse::common::sparse_vector::{SparseVector, double_sort}; use sparse::common::types::{DimId, DimId64, DimWeight}; use crate::common::operation_error::OperationError; #[derive(Debug, PartialEq, Clone, Se...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/dense/memmap_dense_vector_storage.rs
lib/segment/src/vector_storage/dense/memmap_dense_vector_storage.rs
use std::borrow::Cow; use std::io::{self, BufWriter, Write}; use std::mem::MaybeUninit; use std::ops::Range; use std::path::{Path, PathBuf}; use std::sync::atomic::AtomicBool; use bitvec::prelude::BitSlice; use common::counter::hardware_counter::HardwareCounterCell; use common::types::PointOffsetType; use fs_err as fs...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/dense/simple_dense_vector_storage.rs
lib/segment/src/vector_storage/dense/simple_dense_vector_storage.rs
use std::borrow::Cow; use std::mem::size_of; use std::ops::Range; use std::sync::Arc; use std::sync::atomic::AtomicBool; use bitvec::prelude::{BitSlice, BitVec}; use common::counter::hardware_counter::HardwareCounterCell; use common::ext::BitSliceExt as _; use common::types::PointOffsetType; use log::debug; use parkin...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/dense/appendable_dense_vector_storage.rs
lib/segment/src/vector_storage/dense/appendable_dense_vector_storage.rs
use std::borrow::Cow; use std::mem::MaybeUninit; use std::ops::Range; use std::path::{Path, PathBuf}; use std::sync::atomic::AtomicBool; use bitvec::prelude::BitSlice; use common::counter::hardware_counter::HardwareCounterCell; use common::maybe_uninit::maybe_uninit_fill_from; use common::types::PointOffsetType; use f...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/dense/mod.rs
lib/segment/src/vector_storage/dense/mod.rs
pub mod appendable_dense_vector_storage; pub mod memmap_dense_vector_storage; pub mod mmap_dense_vectors; #[cfg(feature = "rocksdb")] pub mod simple_dense_vector_storage; pub mod volatile_dense_vector_storage;
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/dense/volatile_dense_vector_storage.rs
lib/segment/src/vector_storage/dense/volatile_dense_vector_storage.rs
use std::borrow::Cow; use std::ops::Range; use std::sync::atomic::AtomicBool; use bitvec::prelude::{BitSlice, BitVec}; use common::counter::hardware_counter::HardwareCounterCell; use common::ext::BitSliceExt as _; use common::types::PointOffsetType; use crate::common::Flusher; use crate::common::operation_error::{Ope...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/dense/mmap_dense_vectors.rs
lib/segment/src/vector_storage/dense/mmap_dense_vectors.rs
use std::io::Write; use std::mem::{self, MaybeUninit, size_of, transmute}; use std::path::Path; use std::sync::Arc; use bitvec::prelude::BitSlice; use common::ext::BitSliceExt as _; use common::maybe_uninit::maybe_uninit_fill_from; use common::types::PointOffsetType; use fs_err::{File, OpenOptions}; use memmap2::Mmap;...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/query_scorer/custom_query_scorer.rs
lib/segment/src/vector_storage/query_scorer/custom_query_scorer.rs
use std::borrow::Cow; use std::marker::PhantomData; use std::mem::MaybeUninit; use common::counter::hardware_counter::HardwareCounterCell; use common::typelevel::True; use common::types::{PointOffsetType, ScoreType}; use zerocopy::FromBytes; use crate::data_types::primitive::PrimitiveVectorElement; use crate::data_ty...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/query_scorer/sparse_custom_query_scorer.rs
lib/segment/src/vector_storage/query_scorer/sparse_custom_query_scorer.rs
use common::counter::hardware_counter::HardwareCounterCell; use common::typelevel::False; use common::types::{PointOffsetType, ScoreType}; use sparse::common::sparse_vector::SparseVector; use sparse::common::types::{DimId, DimWeight}; use crate::vector_storage::query::{Query, TransformInto}; use crate::vector_storage:...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/query_scorer/sparse_metric_query_scorer.rs
lib/segment/src/vector_storage/query_scorer/sparse_metric_query_scorer.rs
use common::counter::hardware_counter::HardwareCounterCell; use common::typelevel::False; use common::types::{PointOffsetType, ScoreType}; use sparse::common::sparse_vector::SparseVector; use crate::vector_storage::query_scorer::QueryScorer; use crate::vector_storage::sparse::volatile_sparse_vector_storage::VolatileSp...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/query_scorer/mod.rs
lib/segment/src/vector_storage/query_scorer/mod.rs
use bytemuck::TransparentWrapper; use common::typelevel::{TBool, TOption}; use common::types::{PointOffsetType, ScoreType}; use crate::data_types::primitive::PrimitiveVectorElement; use crate::data_types::vectors::TypedMultiDenseVectorRef; use crate::spaces::metric::Metric; use crate::types::{MultiVectorComparator, Mu...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/query_scorer/multi_custom_query_scorer.rs
lib/segment/src/vector_storage/query_scorer/multi_custom_query_scorer.rs
use std::marker::PhantomData; use std::mem::MaybeUninit; use common::counter::hardware_counter::HardwareCounterCell; use common::typelevel::False; use common::types::{PointOffsetType, ScoreType}; use super::score_multi; use crate::data_types::named_vectors::CowMultiVector; use crate::data_types::primitive::PrimitiveV...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/query_scorer/metric_query_scorer.rs
lib/segment/src/vector_storage/query_scorer/metric_query_scorer.rs
use std::borrow::Cow; use std::marker::PhantomData; use std::mem::MaybeUninit; use common::counter::hardware_counter::HardwareCounterCell; use common::typelevel::True; use common::types::{PointOffsetType, ScoreType}; use zerocopy::FromBytes; use crate::data_types::primitive::PrimitiveVectorElement; use crate::data_ty...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/vector_storage/query_scorer/multi_metric_query_scorer.rs
lib/segment/src/vector_storage/query_scorer/multi_metric_query_scorer.rs
use std::marker::PhantomData; use std::mem::MaybeUninit; use common::counter::hardware_counter::HardwareCounterCell; use common::typelevel::False; use common::types::{PointOffsetType, ScoreType}; use super::score_multi; use crate::data_types::named_vectors::CowMultiVector; use crate::data_types::primitive::PrimitiveV...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/utils/maybe_arc.rs
lib/segment/src/utils/maybe_arc.rs
use std::ops::Deref; use std::sync::Arc; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; // Structure that acts as `T` most of the time but allows to interchange being wrapped within an `Arc` or not. // This is helpful, when a variable can become memory-intensive but must remain the ability to get clon...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/utils/path.rs
lib/segment/src/utils/path.rs
use std::path::Path; use crate::common::operation_error::{OperationError, OperationResult}; pub fn strip_prefix<'a>(path: &'a Path, prefix: &Path) -> OperationResult<&'a Path> { path.strip_prefix(prefix).map_err(|err| { OperationError::service_error(format!( "failed to strip {prefix:?} prefix ...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/utils/fs.rs
lib/segment/src/utils/fs.rs
use std::fmt; use std::path::Path; use fs_err as fs; use crate::common::operation_error::{OperationError, OperationResult}; /// Move all files and directories from the `dir` directory to the `dest_dir` directory. /// /// - `<dir>/child/directory` will be merged with `<dest-dir>/child/directory` if one already exists...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/utils/mod.rs
lib/segment/src/utils/mod.rs
pub mod fmt; pub mod fs; pub mod maybe_arc; pub mod mem; pub mod path; pub mod scored_point_ties;
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/utils/scored_point_ties.rs
lib/segment/src/utils/scored_point_ties.rs
use std::cmp::Ordering; use crate::types::ScoredPoint; // Newtype to provide alternative comparator for ScoredPoint which breaks ties by id pub struct ScoredPointTies<'a>(pub &'a ScoredPoint); impl<'a> From<&'a ScoredPoint> for ScoredPointTies<'a> { fn from(scored_point: &'a ScoredPoint) -> Self { Scored...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/utils/mem.rs
lib/segment/src/utils/mem.rs
#[derive(Debug)] pub struct Mem { #[cfg(target_os = "linux")] cgroups: Option<cgroups_mem::CgroupsMem>, sysinfo: sysinfo_mem::SysinfoMem, } impl Mem { #[allow(clippy::new_without_default)] pub fn new() -> Self { Self { #[cfg(target_os = "linux")] cgroups: cgroups_mem...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/utils/fmt.rs
lib/segment/src/utils/fmt.rs
use std::fmt; #[derive(Copy, Clone, Debug)] pub struct SerdeValue<'a>(pub &'a serde_value::Value); impl fmt::Display for SerdeValue<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let val: &dyn fmt::Display = match &self.0 { serde_value::Value::Bool(val) => val, se...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/common/operation_time_statistics.rs
lib/segment/src/common/operation_time_statistics.rs
use std::sync::Arc; use std::time::{Duration, Instant}; use chrono::{DateTime, SubsecRound, Utc}; use common::types::DetailsLevel::Level1; use common::types::TelemetryDetail; use is_sorted::IsSorted; use itertools::Itertools as _; use parking_lot::Mutex; use schemars::JsonSchema; use serde::Serialize; use smallvec::Sm...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/common/rocksdb_buffered_delete_wrapper.rs
lib/segment/src/common/rocksdb_buffered_delete_wrapper.rs
use std::sync::Arc; use ahash::AHashSet; use parking_lot::{Mutex, RwLock}; use rocksdb::DB; use super::rocksdb_wrapper::DatabaseColumnIterator; use crate::common::Flusher; use crate::common::operation_error::OperationResult; use crate::common::rocksdb_wrapper::{DatabaseColumnWrapper, LockedDatabaseColumnWrapper}; //...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/common/error_logging.rs
lib/segment/src/common/error_logging.rs
use log::debug; pub trait LogError { fn describe(self, msg: &str) -> Self; } impl<T, E> LogError for Result<T, E> { fn describe(self, msg: &str) -> Self { if self.is_err() { debug!("Error while: {msg}"); } self } }
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/common/reciprocal_rank_fusion.rs
lib/segment/src/common/reciprocal_rank_fusion.rs
//! Reciprocal Rank Fusion (RRF) is a method for combining rankings from multiple sources. //! See <https://plg.uwaterloo.ca/~gvcormac/cormacksigir09-rrf.pdf> use std::collections::hash_map::Entry; use ahash::AHashMap; use ordered_float::OrderedFloat; use crate::types::{ExtendedPointId, ScoredPoint}; /// Mitigates ...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/common/mmap_bitslice_buffered_update_wrapper.rs
lib/segment/src/common/mmap_bitslice_buffered_update_wrapper.rs
use std::sync::Arc; use ahash::AHashMap; use common::ext::BitSliceExt as _; use common::is_alive_lock::IsAliveLock; use memory::mmap_type::MmapBitSlice; use parking_lot::{Mutex, RwLock}; use crate::common::Flusher; /// A wrapper around `MmapBitSlice` that delays writing changes to the underlying file until they get ...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/common/rocksdb_buffered_update_wrapper.rs
lib/segment/src/common/rocksdb_buffered_update_wrapper.rs
use std::sync::Arc; use ahash::{AHashMap, AHashSet}; use parking_lot::Mutex; use crate::common::Flusher; use crate::common::operation_error::{OperationError, OperationResult}; use crate::common::rocksdb_wrapper::{DatabaseColumnWrapper, LockedDatabaseColumnWrapper}; /// Wrapper around `DatabaseColumnWrapper` that ens...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/common/anonymize.rs
lib/segment/src/common/anonymize.rs
use std::collections::hash_map::DefaultHasher; use std::collections::{BTreeMap, HashMap}; use std::hash::{Hash, Hasher}; use chrono::{DateTime, Utc}; use ecow::{EcoString, eco_format}; pub use macros::Anonymize; use uuid::Uuid; /// This trait provides a derive macro. /// /// # Usage example /// /// ```ignore /// #[de...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/common/score_fusion.rs
lib/segment/src/common/score_fusion.rs
use std::iter; use ahash::AHashMap; use common::types::ScoreType; use itertools::{Itertools, MinMaxResult}; use ordered_float::OrderedFloat; use crate::types::{Order, PointIdType, ScoredPoint}; pub struct ScoreFusion { /// Defines how to combine the scores of the same point in different lists pub method: Agg...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/common/utils.rs
lib/segment/src/common/utils.rs
use std::collections::HashMap; use std::hash::{DefaultHasher, Hash, Hasher}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use serde_json::Value; use smallvec::SmallVec; use crate::data_types::named_vectors::NamedVectors; use crate::data_types::vectors::VectorInternal; use crate::index::field_index::...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/common/macros.rs
lib/segment/src/common/macros.rs
/// Similar to `#[derive(JsonSchema)]`, but allows to override `schema_name()` /// for each generic specialization using the following syntax: /// ```ignore /// #[macro_rules_attribute::macro_rules_derive(schemars_rename_generics)] /// #[derive_args(<i32> => "NewName", ...)] /// ``` /// Workaround for <https://github.c...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/common/mod.rs
lib/segment/src/common/mod.rs
pub mod anonymize; pub mod error_logging; pub mod flags; pub mod macros; pub mod mmap_bitslice_buffered_update_wrapper; pub mod mmap_slice_buffered_update_wrapper; pub mod operation_error; pub mod operation_time_statistics; pub mod reciprocal_rank_fusion; #[cfg(feature = "rocksdb")] pub mod rocksdb_buffered_delete_wrap...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/common/vector_utils.rs
lib/segment/src/common/vector_utils.rs
use std::collections::TryReserveError; pub trait TrySetCapacity { fn try_set_capacity(&mut self, capacity: usize) -> Result<(), TryReserveError>; } pub trait TrySetCapacityExact { fn try_set_capacity_exact(&mut self, capacity: usize) -> Result<(), TryReserveError>; } impl<T> TrySetCapacity for Vec<T> { f...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/common/rocksdb_wrapper.rs
lib/segment/src/common/rocksdb_wrapper.rs
use std::fmt::Debug; use std::path::Path; use std::sync::Arc; use parking_lot::RwLock; //use atomic_refcell::{AtomicRef, AtomicRefCell}; use rocksdb::{ColumnFamily, DB, DBRecoveryMode, LogLevel, Options, WriteOptions}; use crate::common::Flusher; //use crate::common::arc_rwlock_iterator::ArcRwLockIterator; use crate:...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/common/mmap_slice_buffered_update_wrapper.rs
lib/segment/src/common/mmap_slice_buffered_update_wrapper.rs
use std::sync::Arc; use ahash::AHashMap; use common::is_alive_lock::IsAliveLock; use common::types::PointOffsetType; use memory::mmap_type::MmapSlice; use parking_lot::{Mutex, RwLock}; use crate::common::Flusher; /// A wrapper around `MmapSlice` that delays writing changes to the underlying file until they get /// f...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/common/operation_error.rs
lib/segment/src/common/operation_error.rs
use std::backtrace::Backtrace; use std::collections::TryReserveError; use std::io::{Error as IoError, ErrorKind}; use std::sync::atomic::{AtomicBool, Ordering}; use std::time::Duration; use atomicwrites::Error as AtomicIoError; use gridstore::error::GridstoreError; use io::file_operations::FileStorageError; use memory...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/common/validate_snapshot_archive.rs
lib/segment/src/common/validate_snapshot_archive.rs
use std::io; use std::path::Path; use fs_err as fs; use crate::common::operation_error::{OperationError, OperationResult}; pub fn open_snapshot_archive_with_validation( path: &Path, ) -> OperationResult<tar::Archive<impl io::Read + io::Seek>> { validate_snapshot_archive(path)?; open_snapshot_archive(path...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/common/flags/buffered_dynamic_flags.rs
lib/segment/src/common/flags/buffered_dynamic_flags.rs
use std::path::PathBuf; use std::sync::Arc; use ahash::AHashMap; use common::is_alive_lock::IsAliveLock; use common::types::PointOffsetType; use parking_lot::{Mutex, RwLock}; use super::dynamic_mmap_flags::DynamicMmapFlags; use crate::common::Flusher; use crate::common::operation_error::OperationResult; /// A buffer...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/common/flags/dynamic_mmap_flags.rs
lib/segment/src/common/flags/dynamic_mmap_flags.rs
use std::cmp::max; use std::fmt; use std::path::{Path, PathBuf}; use bitvec::prelude::BitSlice; use common::counter::referenced_counter::HwMetricRefCounter; use common::types::PointOffsetType; use fs_err as fs; use memmap2::MmapMut; use memory::fadvise::clear_disk_cache; use memory::madvise::{self, AdviceSetting, Madv...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/common/flags/bitvec_flags.rs
lib/segment/src/common/flags/bitvec_flags.rs
use std::path::PathBuf; use bitvec::slice::BitSlice; use bitvec::vec::BitVec; use common::types::PointOffsetType; use super::buffered_dynamic_flags::BufferedDynamicFlags; use super::dynamic_mmap_flags::DynamicMmapFlags; use crate::common::Flusher; use crate::common::operation_error::OperationResult; /// A buffered, ...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/common/flags/roaring_flags.rs
lib/segment/src/common/flags/roaring_flags.rs
use std::path::PathBuf; use common::types::PointOffsetType; use roaring::RoaringBitmap; use super::buffered_dynamic_flags::BufferedDynamicFlags; use super::dynamic_mmap_flags::DynamicMmapFlags; use crate::common::Flusher; use crate::common::operation_error::OperationResult; /// A buffered, growable, and persistent b...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/common/flags/mod.rs
lib/segment/src/common/flags/mod.rs
//! Different flavors of flags structures, akin to a Vec<bool>, but persistent and efficient. //! //! Here's a brief overview of the different flavors of flags structures: //! - `dynamic_mmap_flags`: Base implementation of storage in mmapped files. //! - `buffered_dynamic_flags`: Builds on top of `dynamic_mmap_flags` t...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/spaces/simple_neon.rs
lib/segment/src/spaces/simple_neon.rs
#[cfg(target_feature = "neon")] use std::arch::aarch64::*; #[cfg(target_feature = "neon")] use common::types::ScoreType; use super::tools::is_length_zero_or_normalized; use crate::data_types::vectors::DenseVector; #[cfg(target_feature = "neon")] use crate::data_types::vectors::VectorElementType; #[cfg(target_feature...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/spaces/simple.rs
lib/segment/src/spaces/simple.rs
use common::types::ScoreType; use super::metric::{Metric, MetricPostProcessing}; #[cfg(target_arch = "x86_64")] use super::simple_avx::*; #[cfg(all(target_arch = "aarch64", target_feature = "neon"))] use super::simple_neon::*; #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] use super::simple_sse::*; use super...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/spaces/simple_sse.rs
lib/segment/src/spaces/simple_sse.rs
#[cfg(target_arch = "x86")] use std::arch::x86::*; #[cfg(target_arch = "x86_64")] use std::arch::x86_64::*; use common::types::ScoreType; use super::tools::is_length_zero_or_normalized; use crate::data_types::vectors::{DenseVector, VectorElementType}; #[target_feature(enable = "sse")] #[allow(clippy::missing_safety_...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/spaces/simple_avx.rs
lib/segment/src/spaces/simple_avx.rs
use std::arch::x86_64::*; use common::types::ScoreType; use super::tools::is_length_zero_or_normalized; use crate::data_types::vectors::{DenseVector, VectorElementType}; #[target_feature(enable = "avx")] #[allow(clippy::missing_safety_doc)] pub unsafe fn hsum256_ps_avx(x: __m256) -> f32 { let lr_sum: __m128 = _m...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/spaces/mod.rs
lib/segment/src/spaces/mod.rs
pub mod metric; pub mod simple; pub mod tools; #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] pub mod simple_sse; #[cfg(target_arch = "x86_64")] pub mod simple_avx; pub mod metric_f16; pub mod metric_uint; #[cfg(target_arch = "aarch64")] pub mod simple_neon;
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/spaces/tools.rs
lib/segment/src/spaces/tools.rs
use std::cmp::Reverse; use common::fixed_length_priority_queue::FixedLengthPriorityQueue; /// Check if the length is zero or normalized enough. /// /// When checking if normalized, we don't check if it's exactly 1.0 but rather whether it is close /// enough. It prevents multiple normalization iterations from being un...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/segment/src/spaces/metric.rs
lib/segment/src/spaces/metric.rs
use common::types::ScoreType; use crate::data_types::primitive::PrimitiveVectorElement; use crate::data_types::vectors::DenseVector; use crate::types::Distance; /// Defines how to compare vectors pub trait Metric<T: PrimitiveVectorElement> { fn distance() -> Distance; /// Greater the value - closer the vecto...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false