Shortcuts

qdrant_client.local.local_collection module

class LocalCollection(config: CreateCollection, location: Optional[str] = None, force_disable_check_same_thread: bool = False)[source]

Bases: object

LocalCollection is a class that represents a collection of vectors in the local storage.

batch_update_points(update_operations: Sequence[Union[UpsertOperation, DeleteOperation, SetPayloadOperation, OverwritePayloadOperation, DeletePayloadOperation, ClearPayloadOperation, UpdateVectorsOperation, DeleteVectorsOperation]]) None[source]
clear_payload(selector: Union[Filter, List[Union[str[str], int[int]]], FilterSelector, PointIdsList]) None[source]
close() None[source]
count(count_filter: Optional[Union[Filter, Filter]] = None) CountResult[source]
delete(selector: Union[Filter, List[Union[str[str], int[int]]], FilterSelector, PointIdsList]) None[source]
delete_payload(keys: Sequence[str], selector: Union[Filter, List[Union[str[str], int[int]]], FilterSelector, PointIdsList]) None[source]
delete_vectors(vectors: Sequence[str], selector: Union[Filter, List[Union[str[str], int[int]]], FilterSelector, PointIdsList]) None[source]
discover(target: Optional[Union[int[int], str[str], List[float[float]], SparseVector, TargetVector]] = None, context: Optional[Sequence[Union[ContextExamplePair, ContextExamplePair]]] = None, query_filter: Optional[Union[Filter, Filter]] = None, limit: int = 10, offset: int = 0, with_payload: Union[bool, List[str], PayloadSelectorInclude, PayloadSelectorExclude, WithPayloadSelector] = True, with_vectors: Union[bool, List[str]] = False, using: Optional[str] = None, lookup_from_collection: Optional[LocalCollection] = None, lookup_from_vector_name: Optional[str] = None) List[ScoredPoint][source]
get_vector_params(name: str) VectorParams[source]
info() CollectionInfo[source]
load_vectors() None[source]
overwrite_payload(payload: Dict[str, Any], selector: Union[Filter, List[Union[str[str], int[int]]], FilterSelector, PointIdsList]) None[source]
recommend(positive: Optional[Sequence[Union[int[int], str[str], List[float[float]], SparseVector]]] = None, negative: Optional[Sequence[Union[int[int], str[str], List[float[float]], SparseVector]]] = None, query_filter: Optional[Union[Filter, Filter]] = None, limit: int = 10, offset: int = 0, with_payload: Union[bool, List[str], PayloadSelectorInclude, PayloadSelectorExclude, WithPayloadSelector] = True, with_vectors: Union[bool, List[str]] = False, score_threshold: Optional[float] = None, using: Optional[str] = None, lookup_from_collection: Optional[LocalCollection] = None, lookup_from_vector_name: Optional[str] = None, strategy: Optional[RecommendStrategy] = None) List[ScoredPoint][source]
recommend_groups(group_by: str, positive: Optional[Sequence[Union[int[int], str[str], List[float[float]], SparseVector]]] = None, negative: Optional[Sequence[Union[int[int], str[str], List[float[float]], SparseVector]]] = None, query_filter: Optional[Filter] = None, limit: int = 10, group_size: int = 1, score_threshold: Optional[float] = None, with_payload: Union[bool, Sequence[str], PayloadSelectorInclude, PayloadSelectorExclude] = True, with_vectors: Union[bool, Sequence[str]] = False, using: Optional[str] = None, lookup_from_collection: Optional[LocalCollection] = None, lookup_from_vector_name: Optional[str] = None, with_lookup: Optional[Union[str[str], WithLookup]] = None, with_lookup_collection: Optional[LocalCollection] = None, strategy: Optional[RecommendStrategy] = None) GroupsResult[source]
retrieve(ids: Sequence[Union[int, str, PointId]], with_payload: Union[bool, Sequence[str], PayloadSelectorInclude, PayloadSelectorExclude, WithPayloadSelector] = True, with_vectors: Union[bool, Sequence[str]] = False) List[Record][source]
scroll(scroll_filter: Optional[Union[Filter, Filter]] = None, limit: int = 10, order_by: Optional[Union[str[str], OrderBy, OrderBy]] = None, offset: Optional[Union[int, str, PointId]] = None, with_payload: Union[bool, Sequence[str], PayloadSelectorInclude, PayloadSelectorExclude, WithPayloadSelector] = True, with_vectors: Union[bool, Sequence[str]] = False) Tuple[List[Record], Optional[Union[int, str, PointId]]][source]
search(query_vector: Union[ndarray[Any, dtype[Union[bool_, int8, int16, int32, int64, uint8, uint16, uint32, uint64, float16, float32, float64, float128]]], List[float], Tuple[str, List[float]], NamedVector, NamedSparseVector, DiscoveryQuery, ContextQuery, RecoQuery, SparseVector, Tuple[str, Union[DiscoveryQuery, ContextQuery, RecoQuery, ndarray[Any, dtype[Union[bool_, int8, int16, int32, int64, uint8, uint16, uint32, uint64, float16, float32, float64, float128]]], SparseVector]]], query_filter: Optional[Union[Filter, Filter]] = None, limit: int = 10, offset: Optional[int] = None, with_payload: Union[bool, Sequence[str], PayloadSelectorInclude, PayloadSelectorExclude, WithPayloadSelector] = True, with_vectors: Union[bool, Sequence[str]] = False, score_threshold: Optional[float] = None) List[ScoredPoint][source]
search_groups(query_vector: Union[ndarray[Any, dtype[Union[bool_, int8, int16, int32, int64, uint8, uint16, uint32, uint64, float16, float32, float64, float128]]], Sequence[float], Tuple[str, Union[List[float], RecoQuery, ndarray[Any, dtype[Union[bool_, int8, int16, int32, int64, uint8, uint16, uint32, uint64, float16, float32, float64, float128]]]]], NamedVector, NamedSparseVector, RecoQuery], group_by: str, query_filter: Optional[Filter] = None, limit: int = 10, group_size: int = 1, with_payload: Union[bool, Sequence[str], PayloadSelectorInclude, PayloadSelectorExclude] = True, with_vectors: Union[bool, Sequence[str]] = False, score_threshold: Optional[float] = None, with_lookup: Optional[Union[str[str], WithLookup]] = None, with_lookup_collection: Optional[LocalCollection] = None) GroupsResult[source]
set_payload(payload: Dict[str, Any], selector: Union[Filter, List[Union[str[str], int[int]]], FilterSelector, PointIdsList], key: Optional[str] = None) None[source]
update_vectors(points: Sequence[PointVectors]) None[source]
upsert(points: Union[List[PointStruct], Batch]) None[source]
to_jsonable_python(x: Any) Any[source]

Qdrant

Learn more about Qdrant vector search project and ecosystem

Discover Qdrant

Similarity Learning

Explore practical problem solving with Similarity Learning

Learn Similarity Learning

Community

Find people dealing with similar problems and get answers to your questions

Join Community