docarray.array.storage.elastic.backend module#

class docarray.array.storage.elastic.backend.ElasticConfig(n_dim, distance='cosine', hosts='http://localhost:9200', index_name=None, list_like=True, es_config=<factory>, index_text=False, tag_indices=<factory>, batch_size=64, ef_construction=None, m=None, columns=None, root_id=True)[source]#

Bases: object

n_dim: int#
distance: str = 'cosine'#
hosts: Optional[Union[str, List[Union[str, Mapping[str, Union[str, int]]]]]] = 'http://localhost:9200'#
index_name: Optional[str] = None#
list_like: bool = True#
es_config: Dict[str, Any]#
index_text: bool = False#
tag_indices: List[str]#
batch_size: int = 64#
ef_construction: Optional[int] = None#
m: Optional[int] = None#
columns: Optional[Union[List[Tuple[str, str]], Dict[str, str]]] = None#
root_id: bool = True#
class docarray.array.storage.elastic.backend.BackendMixin[source]#

Bases: BaseBackendMixin

Provide necessary functions to enable this storage backend.

TYPE_MAP: Dict[str, TypeMap] = {'bool': TypeMap(type='boolean', converter=<class 'bool'>), 'double': TypeMap(type='double', converter=<class 'float'>), 'float': TypeMap(type='float', converter=<class 'float'>), 'int': TypeMap(type='integer', converter=<function _safe_cast_int>), 'long': TypeMap(type='long', converter=<function _safe_cast_int>), 'str': TypeMap(type='text', converter=<class 'str'>)}#