docarray.array.storage.qdrant package#

Submodules#

Module contents#

class docarray.array.storage.qdrant.StorageMixins(*args, **kwds)[source]#

Bases: FindMixin, BackendMixin, GetSetDelMixin, SequenceLikeMixin

property serialize_config: dict#
Return type:

dict

property distance: Distance#
Return type:

Distance

property serialization_config: dict#
Return type:

dict

property n_dim: int#
Return type:

int

property collection_name: str#
Return type:

str

property collection_name_meta: str#
Return type:

str

property config#
property client: QdrantClient#
Return type:

QdrantClient

property scroll_batch_size: int#
Return type:

int

TYPE_MAP: Dict[str, TypeMap] = {'bool': TypeMap(type='int', converter=<class 'bool'>), 'float': TypeMap(type='float', converter=<class 'float'>), 'geo': TypeMap(type='geo', converter=<class 'dict'>), 'int': TypeMap(type='integer', converter=<class 'int'>), 'str': TypeMap(type='keyword', converter=<class 'str'>), 'text': TypeMap(type='text', converter=<class 'str'>)}#
append(value, **kwargs)#

Append doc to the end of the array.

Parameters:

value (Document) – The doc needs to be appended.

clear()#

Clear the data of DocumentArray

count(value) integer -- return number of occurrences of value#
extend(values, **kwargs)#

S.extend(iterable) – extend sequence by appending elements from the iterable

Return type:

None

index(value[, start[, stop]]) integer -- return first index of value.#

Raises ValueError if the value is not present.

Supporting start and stop arguments is optional, but recommended.

insert(index, value, **kwargs)#

Insert doc at index.

Parameters:
  • index (int) – Position of the insertion.

  • value (Document) – The doc needs to be inserted.

  • kwargs – Additional Arguments that are passed to the Document Store. This has no effect for in-memory DocumentArray.

pop([index]) item -- remove and return item at index (default last).#

Raise IndexError if list is empty or index is out of range.

remove(value)#

S.remove(value) – remove first occurrence of value. Raise ValueError if the value is not present.

reverse()#

S.reverse() – reverse IN PLACE

scan()#
Return type:

Iterator[Document]

sync()#
class docarray.array.storage.qdrant.QdrantConfig(n_dim, distance='cosine', collection_name=None, list_like=True, host='localhost', port=6333, grpc_port=6334, prefer_grpc=False, api_key=None, https=None, serialize_config=<factory>, scroll_batch_size=64, ef_construct=None, full_scan_threshold=None, m=None, columns=None, root_id=True)[source]#

Bases: object

n_dim: int#
distance: str = 'cosine'#
collection_name: Optional[str] = None#
list_like: bool = True#
host: Optional[str] = 'localhost'#
port: Optional[int] = 6333#
grpc_port: Optional[int] = 6334#
prefer_grpc: Optional[bool] = False#
api_key: Optional[str] = None#
https: Optional[bool] = None#
serialize_config: Dict#
scroll_batch_size: int = 64#
ef_construct: Optional[int] = None#
full_scan_threshold: Optional[int] = None#
m: Optional[int] = None#
columns: Optional[Union[List[Tuple[str, str]], Dict[str, str]]] = None#
root_id: bool = True#