docarray.array.storage.weaviate package#
Submodules#
- docarray.array.storage.weaviate.backend module
WeaviateConfigWeaviateConfig.hostWeaviateConfig.portWeaviateConfig.protocolWeaviateConfig.nameWeaviateConfig.list_likeWeaviateConfig.serialize_configWeaviateConfig.n_dimWeaviateConfig.efWeaviateConfig.ef_constructionWeaviateConfig.timeout_configWeaviateConfig.max_connectionsWeaviateConfig.dynamic_ef_minWeaviateConfig.dynamic_ef_maxWeaviateConfig.dynamic_ef_factorWeaviateConfig.vector_cache_max_objectsWeaviateConfig.flat_search_cutoffWeaviateConfig.cleanup_interval_secondsWeaviateConfig.skipWeaviateConfig.columnsWeaviateConfig.distanceWeaviateConfig.batch_sizeWeaviateConfig.dynamic_batchingWeaviateConfig.root_id
BackendMixin
- docarray.array.storage.weaviate.find module
- docarray.array.storage.weaviate.getsetdel module
- docarray.array.storage.weaviate.seqlike module
Module contents#
- class docarray.array.storage.weaviate.StorageMixins(*args, **kwds)[source]#
Bases:
FindMixin,BackendMixin,GetSetDelMixin,SequenceLikeMixin,ABC- TYPE_MAP: Dict[str, TypeMap] = {'float': TypeMap(type='number', converter=<class 'float'>), 'int': TypeMap(type='int', converter=<function _safe_cast_int>), 'str': TypeMap(type='string', 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.
- property name#
An alias to _class_name that returns the id/name of the class in the weaviate of this
DocumentArrayWeaviate- Returns:
name of weaviate class/schema of this
DocumentArrayWeaviate
- 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
- sync()#
- class docarray.array.storage.weaviate.WeaviateConfig(host='localhost', port=8080, protocol='http', name=None, list_like=True, serialize_config=<factory>, n_dim=None, ef=None, ef_construction=None, timeout_config=(10, 60), max_connections=None, dynamic_ef_min=None, dynamic_ef_max=None, dynamic_ef_factor=None, vector_cache_max_objects=None, flat_search_cutoff=None, cleanup_interval_seconds=None, skip=None, columns=None, distance=None, batch_size=50, dynamic_batching=False, root_id=True)[source]#
Bases:
objectThis class stores the config variables to initialize connection to the Weaviate server
- host: Optional[str] = 'localhost'#
- port: Optional[int] = 8080#
- protocol: Optional[str] = 'http'#
- name: Optional[str] = None#
- list_like: bool = True#
- serialize_config: Dict#
- n_dim: Optional[int] = None#
- ef: Optional[int] = None#
- ef_construction: Optional[int] = None#
- timeout_config: Optional[Tuple[int, int]] = (10, 60)#
- max_connections: Optional[int] = None#
- dynamic_ef_min: Optional[int] = None#
- dynamic_ef_max: Optional[int] = None#
- dynamic_ef_factor: Optional[int] = None#
- vector_cache_max_objects: Optional[int] = None#
- flat_search_cutoff: Optional[int] = None#
- cleanup_interval_seconds: Optional[int] = None#
- skip: Optional[bool] = None#
- columns: Optional[Union[List[Tuple[str, str]], Dict[str, str]]] = None#
- distance: Optional[str] = None#
- batch_size: Optional[int] = 50#
- dynamic_batching: Optional[bool] = False#
- root_id: bool = True#