docarray.array.storage.opensearch.backend module#
- class docarray.array.storage.opensearch.backend.OpenSearchConfig(n_dim, distance='cosinesimil', hosts='http://localhost:9900', index_name=None, list_like=True, opensearch_config=<factory>, index_text=False, tag_indices=<factory>, batch_size=64, ef_construction=512, m=16, columns=None, engine='nmslib', ef_search=None, encoder=None, algorithm='hnsw', root_id=True)[source]#
Bases:
object
- n_dim: int#
- distance: str = 'cosinesimil'#
- hosts: Optional[Union[str, List[Union[str, Mapping[str, Union[str, int]]]]]] = 'http://localhost:9900'#
- index_name: Optional[str] = None#
- list_like: bool = True#
- opensearch_config: Dict[str, Any]#
- index_text: bool = False#
- tag_indices: List[str]#
- batch_size: int = 64#
- ef_construction: Optional[int] = 512#
- m: Optional[int] = 16#
- columns: Optional[Union[List[Tuple[str, str]], Dict[str, str]]] = None#
- engine: str = 'nmslib'#
- ef_search: Optional[int] = None#
- encoder: Optional[str] = None#
- algorithm: str = 'hnsw'#
- root_id: bool = True#
- class docarray.array.storage.opensearch.backend.BackendMixin[source]#
Bases:
BaseBackendMixin
- 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'>)}#