jina.executors.indexers.dbms.keyvalue

class jina.executors.indexers.dbms.keyvalue.BinaryPbDBMSIndexer(*args, **kwargs)[source]

Bases: jina.executors.indexers.keyvalue.BinaryPbWriterMixin, jina.executors.indexers.dbms.BaseDBMSIndexer

A DBMS Indexer (no query method)

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

Return type

None

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 the serialized documents from the index via document ids.

Parameters
  • ids (List[str]) – a list of id, i.e. doc.id in protobuf

  • args – not used

  • kwargs – not used

class jina.executors.indexers.dbms.keyvalue.KeyValueDBMSIndexer(*args, **kwargs)[source]

Bases: jina.executors.indexers.dbms.keyvalue.BinaryPbDBMSIndexer

An alias