qdrant_client.client_base module¶
- class QdrantBase(**kwargs: Any)[source]¶
Bases:
object
- batch_update_points(collection_name: str, update_operations: Sequence[Union[UpsertOperation, DeleteOperation, SetPayloadOperation, OverwritePayloadOperation, DeletePayloadOperation, ClearPayloadOperation, UpdateVectorsOperation, DeleteVectorsOperation]], **kwargs: Any) List[UpdateResult] [source]¶
- clear_payload(collection_name: str, points_selector: Union[List[Union[int, str, PointId]], Filter, Filter, PointIdsList, FilterSelector, PointsSelector], **kwargs: Any) UpdateResult [source]¶
- count(collection_name: str, count_filter: Optional[Union[Filter, Filter]] = None, exact: bool = True, **kwargs: Any) CountResult [source]¶
- create_collection(collection_name: str, vectors_config: Union[VectorParams, Mapping[str, VectorParams]], **kwargs: Any) bool [source]¶
- create_full_snapshot(**kwargs: Any) Optional[SnapshotDescription] [source]¶
- create_payload_index(collection_name: str, field_name: str, field_schema: Optional[Union[PayloadSchemaType, KeywordIndexParams, IntegerIndexParams, FloatIndexParams, GeoIndexParams, TextIndexParams, BoolIndexParams, DatetimeIndexParams, UuidIndexParams, int, PayloadIndexParams]] = None, field_type: Optional[Union[PayloadSchemaType, KeywordIndexParams, IntegerIndexParams, FloatIndexParams, GeoIndexParams, TextIndexParams, BoolIndexParams, DatetimeIndexParams, UuidIndexParams, int, PayloadIndexParams]] = None, **kwargs: Any) UpdateResult [source]¶
- create_shard_key(collection_name: str, shard_key: Union[int[int], str[str]], shards_number: Optional[int] = None, replication_factor: Optional[int] = None, placement: Optional[List[int]] = None, **kwargs: Any) bool [source]¶
- create_shard_snapshot(collection_name: str, shard_id: int, **kwargs: Any) Optional[SnapshotDescription] [source]¶
- create_snapshot(collection_name: str, **kwargs: Any) Optional[SnapshotDescription] [source]¶
- delete(collection_name: str, points_selector: Union[List[Union[int, str, PointId]], Filter, Filter, PointIdsList, FilterSelector, PointsSelector], **kwargs: Any) UpdateResult [source]¶
- delete_payload(collection_name: str, keys: Sequence[str], points: Union[List[Union[int, str, PointId]], Filter, Filter, PointIdsList, FilterSelector, PointsSelector], **kwargs: Any) UpdateResult [source]¶
- delete_payload_index(collection_name: str, field_name: str, **kwargs: Any) UpdateResult [source]¶
- delete_shard_key(collection_name: str, shard_key: Union[int[int], str[str]], **kwargs: Any) bool [source]¶
- delete_shard_snapshot(collection_name: str, shard_id: int, snapshot_name: str, **kwargs: Any) Optional[bool] [source]¶
- delete_vectors(collection_name: str, vectors: Sequence[str], points: Union[List[Union[int, str, PointId]], Filter, Filter, PointIdsList, FilterSelector, PointsSelector], **kwargs: Any) UpdateResult [source]¶
- discover(collection_name: str, 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, search_params: Optional[Union[SearchParams, SearchParams]] = 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: Optional[Union[LookupLocation, LookupLocation]] = None, consistency: Optional[Union[int[int], ReadConsistencyType]] = None, **kwargs: Any) List[ScoredPoint] [source]¶
- discover_batch(collection_name: str, requests: Sequence[Union[DiscoverRequest, DiscoverPoints]], **kwargs: Any) List[List[ScoredPoint]] [source]¶
- facet(collection_name: str, key: str, facet_filter: Optional[Union[Filter, Filter]] = None, limit: int = 10, exact: bool = False, **kwargs: Any) FacetResponse [source]¶
- get_aliases(**kwargs: Any) CollectionsAliasesResponse [source]¶
- get_collection(collection_name: str, **kwargs: Any) CollectionInfo [source]¶
- get_collection_aliases(collection_name: str, **kwargs: Any) CollectionsAliasesResponse [source]¶
- get_collections(**kwargs: Any) CollectionsResponse [source]¶
- get_locks(**kwargs: Any) LocksOption [source]¶
- info() VersionInfo [source]¶
- list_full_snapshots(**kwargs: Any) List[SnapshotDescription] [source]¶
- list_shard_snapshots(collection_name: str, shard_id: int, **kwargs: Any) List[SnapshotDescription] [source]¶
- list_snapshots(collection_name: str, **kwargs: Any) List[SnapshotDescription] [source]¶
- lock_storage(reason: str, **kwargs: Any) LocksOption [source]¶
- migrate(dest_client: QdrantBase, collection_names: Optional[List[str]] = None, batch_size: int = 100, recreate_on_collision: bool = False) None [source]¶
- overwrite_payload(collection_name: str, payload: Dict[str, Any], points: Union[List[Union[int, str, PointId]], Filter, Filter, PointIdsList, FilterSelector, PointsSelector], **kwargs: Any) UpdateResult [source]¶
- query_batch_points(collection_name: str, requests: Sequence[Union[QueryRequest, QueryPoints]], **kwargs: Any) List[QueryResponse] [source]¶
- query_points(collection_name: str, query: Optional[Union[int, str, PointId, List[float], List[List[float]], SparseVector, NearestQuery, RecommendQuery, DiscoverQuery, ContextQuery, OrderByQuery, FusionQuery, SampleQuery, ndarray[Any, dtype[Union[bool_, int8, int16, int32, int64, uint8, uint16, uint32, uint64, float16, float32, float64, float128]]], Document]] = None, using: Optional[str] = None, prefetch: Optional[Union[Prefetch, List[Prefetch]]] = None, query_filter: Optional[Union[Filter, Filter]] = None, search_params: Optional[Union[SearchParams, SearchParams]] = 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, lookup_from: Optional[Union[LookupLocation, LookupLocation]] = None, **kwargs: Any) QueryResponse [source]¶
- query_points_groups(collection_name: str, group_by: str, query: Optional[Union[int, str, PointId, List[float], List[List[float]], SparseVector, NearestQuery, RecommendQuery, DiscoverQuery, ContextQuery, OrderByQuery, FusionQuery, SampleQuery, ndarray[Any, dtype[Union[bool_, int8, int16, int32, int64, uint8, uint16, uint32, uint64, float16, float32, float64, float128]]], Document]] = None, using: Optional[str] = None, prefetch: Optional[Union[Prefetch, List[Prefetch]]] = None, query_filter: Optional[Union[Filter, Filter]] = None, search_params: Optional[Union[SearchParams, SearchParams]] = None, limit: int = 10, group_size: int = 3, with_payload: Union[bool, Sequence[str], PayloadSelectorInclude, PayloadSelectorExclude, WithPayloadSelector] = True, with_vectors: Union[bool, Sequence[str]] = False, score_threshold: Optional[float] = None, with_lookup: Optional[Union[str[str], WithLookup]] = None, lookup_from: Optional[Union[LookupLocation, LookupLocation]] = None, **kwargs: Any) GroupsResult [source]¶
- recommend(collection_name: 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[Union[Filter, Filter]] = None, search_params: Optional[Union[SearchParams, SearchParams]] = 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: Optional[Union[LookupLocation, LookupLocation]] = None, strategy: Optional[RecommendStrategy] = None, **kwargs: Any) List[ScoredPoint] [source]¶
- recommend_batch(collection_name: str, requests: Sequence[Union[RecommendRequest, RecommendPoints]], **kwargs: Any) List[List[ScoredPoint]] [source]¶
- recommend_groups(collection_name: str, 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, search_params: Optional[SearchParams] = 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: Optional[LookupLocation] = None, with_lookup: Optional[Union[str[str], WithLookup]] = None, strategy: Optional[RecommendStrategy] = None, **kwargs: Any) GroupsResult [source]¶
- recover_shard_snapshot(collection_name: str, shard_id: int, location: str, **kwargs: Any) Optional[bool] [source]¶
- recreate_collection(collection_name: str, vectors_config: Union[VectorParams, Mapping[str, VectorParams]], **kwargs: Any) bool [source]¶
- retrieve(collection_name: str, ids: Sequence[Union[int, str, PointId]], with_payload: Union[bool, Sequence[str], PayloadSelectorInclude, PayloadSelectorExclude, WithPayloadSelector] = True, with_vectors: Union[bool, Sequence[str]] = False, **kwargs: Any) List[Record] [source]¶
- scroll(collection_name: str, 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, **kwargs: Any) Tuple[List[Record], Optional[Union[int, str, PointId]]] [source]¶
- search(collection_name: str, query_vector: Union[ndarray[Any, dtype[Union[bool_, int8, int16, int32, int64, uint8, uint16, uint32, uint64, float16, float32, float64, float128]]], Sequence[float], Tuple[str, List[float]], NamedVector, NamedSparseVector], query_filter: Optional[Filter] = None, search_params: Optional[SearchParams] = None, limit: int = 10, offset: Optional[int] = None, with_payload: Union[bool, Sequence[str], PayloadSelectorInclude, PayloadSelectorExclude] = True, with_vectors: Union[bool, Sequence[str]] = False, score_threshold: Optional[float] = None, **kwargs: Any) List[ScoredPoint] [source]¶
- search_batch(collection_name: str, requests: Sequence[Union[SearchRequest, SearchPoints]], **kwargs: Any) List[List[ScoredPoint]] [source]¶
- search_groups(collection_name: str, query_vector: Union[ndarray[Any, dtype[Union[bool_, int8, int16, int32, int64, uint8, uint16, uint32, uint64, float16, float32, float64, float128]]], Sequence[float], Tuple[str, List[float]], NamedVector, NamedSparseVector], group_by: str, query_filter: Optional[Filter] = None, search_params: Optional[SearchParams] = 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, **kwargs: Any) GroupsResult [source]¶
- search_matrix_offsets(collection_name: str, query_filter: Optional[Union[Filter, Filter]] = None, limit: int = 3, sample: int = 10, using: Optional[str] = None, **kwargs: Any) SearchMatrixOffsetsResponse [source]¶
- search_matrix_pairs(collection_name: str, query_filter: Optional[Union[Filter, Filter]] = None, limit: int = 3, sample: int = 10, using: Optional[str] = None, **kwargs: Any) SearchMatrixPairsResponse [source]¶
- set_payload(collection_name: str, payload: Dict[str, Any], points: Union[List[Union[int, str, PointId]], Filter, Filter, PointIdsList, FilterSelector, PointsSelector], key: Optional[str] = None, **kwargs: Any) UpdateResult [source]¶
- unlock_storage(**kwargs: Any) LocksOption [source]¶
- update_collection_aliases(change_aliases_operations: Sequence[Union[CreateAliasOperation, RenameAliasOperation, DeleteAliasOperation, AliasOperations]], **kwargs: Any) bool [source]¶
- update_vectors(collection_name: str, points: Sequence[PointVectors], **kwargs: Any) UpdateResult [source]¶
- upload_collection(collection_name: str, vectors: Union[Dict[str, ndarray[Any, dtype[Union[bool_, int8, int16, int32, int64, uint8, uint16, uint32, uint64, float16, float32, float64, float128]]]], ndarray[Any, dtype[Union[bool_, int8, int16, int32, int64, uint8, uint16, uint32, uint64, float16, float32, float64, float128]]], Iterable[Union[List[float[float]], List[List[float[float]]], Dict[str[str], Union[List[float[float]], SparseVector, List[List[float[float]]], Document]], Document]]], payload: Optional[Iterable[Dict[Any, Any]]] = None, ids: Optional[Iterable[Union[int, str, PointId]]] = None, **kwargs: Any) None [source]¶
- upload_points(collection_name: str, points: Iterable[PointStruct], **kwargs: Any) None [source]¶
- upsert(collection_name: str, points: Union[Batch, Sequence[Union[PointStruct, PointStruct]]], **kwargs: Any) UpdateResult [source]¶