Files
qdrant/lib/edge/python/examples/repr.py
Roman Titov 0e7727c2fe Implement __repr__ for Qdrant Edge types (#7695)
* Refactor `PyUpdateOperation` constructors

* Add default parameters to `PyVectorDataConfig::new`

* Add `Repr` trait and `WriteExt` helper

* Implement `__repr__` for config types

* fixup! Implement `__repr__` for config types

Use `Copy` instead of `Clone`

* fixup! Implement `__repr__` for config types

Add basic test

* Implement `__repr__` for `PyPointId`

* Implement `__repr__` for `PyVector`

* Implement `__repr__` for `PyVectorInternal`

* Implement `__repr__` for `PyPayload`

* Implement `__repr__` for `PyValue`

* Implement `__repr__` for `PyPoint`

* Implement `__repr__` for `PyPointVectors`

* Implement `__repr__` for `PyRecord`

* Move `PyScoredPoint` into a separate file

* Implement `__repr__` for `PyScoredPoint`

* Cleanup examples

* fixup! Implement `__repr__` for `PyScoredPoint`

* Move `PyOrderValue` into separate file

* Add `PyScoredPoint::order_value`

* Implement `pyclass_repr` proc-macro attribute

* Implement `__repr__` for config types using `pyclass_repr` attribute

* Implement `__repr__` for `PySparseVector` using `pyclass_repr` attribute

* Implement `__repr__` for `PyPoint` using `pyclass_repr` attribute

* Implement `__repr__` for `PyPointVectors` using `pyclass_repr` attribute

* Implement `__repr__` for `PyRecord` using `pyclass_repr` attribute

* Implement `__repr__` for `PyScoredPoint` using `pyclass_repr` attribute

* Minor fixes and cleanups

* fixup! Minor fixes and cleanups

* rollback copy for quantization config

* rollback copy for quantization config

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-12-18 17:28:22 +01:00

36 lines
986 B
Python
Executable File

#!/usr/bin/env python3
from qdrant_edge import *
config = SegmentConfig(
vector_data = {
"": VectorDataConfig(
size = 128,
distance = Distance.Cosine,
storage_type = VectorStorageType.ChunkedMmap,
index = HnswIndexConfig(
m = 16,
ef_construct = 16,
full_scan_threshold = 1024,
on_disk = False,
payload_m = 16,
inline_storage = False,
),
)
},
sparse_vector_data = {
"sparse": SparseVectorDataConfig(
index = SparseIndexConfig(
full_scan_threshold = 1024,
index_type = SparseIndexType.MutableRam,
datatype = VectorStorageDatatype.Float32,
),
storage_type = SparseVectorStorageType.Mmap,
modifier = Modifier.Idf,
)
},
payload_storage_type = PayloadStorageType.Mmap,
)
print(config)