jina.executors.indexers.dbms

class jina.executors.indexers.dbms.BaseDBMSIndexer(index_filename=None, key_length=36, *args, **kwargs)[source]

Bases: jina.executors.indexers.BaseIndexer

A class only meant for storing (indexing, update, delete) of data

add(ids, vecs, metas, *args, **kwargs)[source]

Add to the DBMS Indexer, both vectors and metadata

Parameters
  • ids (List[str]) – the ids of the documents

  • vecs (List[array]) – the vectors

  • metas (List[bytes]) – the metadata, in binary format

  • args – not used

  • kwargs – not used

update(ids, vecs, metas, *args, **kwargs)[source]

Update the DBMS Indexer, both vectors and metadata

Parameters
  • ids (List[str]) – the ids of the documents

  • vecs (List[array]) – the vectors

  • metas (List[bytes]) – the metadata, in binary format

  • args – not used

  • kwargs – not used

delete(ids, *args, **kwargs)[source]

Delete from the indexer by ids

Parameters
  • ids (List[str]) – the ids of the Documents to delete

  • args – not used

  • kwargs – not used

dump(path, shards)[source]

Dump the index

Parameters
  • path (str) – the path to which to dump

  • shards (int) – the nr of shards to which to dump

query(key, *args, **kwargs)[source]

DBMSIndexers do NOT support querying

Parameters
  • key (str) – the key by which to query

  • args – not used

  • kwargs – not used

Return type

Optional[bytes]