mirror of
https://github.com/qdrant/qdrant.git
synced 2026-08-03 16:40:54 -05:00
* 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>
48 lines
963 B
Python
48 lines
963 B
Python
from qdrant_edge import *
|
|
from common import *
|
|
|
|
|
|
shard = load_new_shard()
|
|
fill_dummy_data(shard)
|
|
|
|
search_filter = Filter(
|
|
must=[
|
|
FieldCondition(
|
|
key="color",
|
|
match=MatchValue(value="red"),
|
|
)
|
|
]
|
|
)
|
|
|
|
result = shard.query(QueryRequest(
|
|
prefetches = [
|
|
Prefetch(
|
|
prefetches=[],
|
|
query=Query.Nearest([6.0, 9.0, 4.0, 2.0]),
|
|
limit=5,
|
|
params=None,
|
|
filter=None,
|
|
score_threshold=None,
|
|
),
|
|
Prefetch(
|
|
prefetches=[],
|
|
query=Query.Nearest([1.0, -3.0, 2.0, 8.0]),
|
|
limit=5,
|
|
params=None,
|
|
filter=search_filter,
|
|
score_threshold=None,
|
|
)
|
|
],
|
|
query = Fusion.rrfk(2),
|
|
filter = None,
|
|
score_threshold = None,
|
|
limit = 10,
|
|
offset = 0,
|
|
params = None,
|
|
with_vector = True,
|
|
with_payload = True,
|
|
))
|
|
|
|
for point in result:
|
|
print(point)
|