gnes.indexer.doc.rocksdb module

class gnes.indexer.doc.rocksdb.RocksDBIndexer(data_path, drop_raw_data=False, drop_chunk_blob=False, read_only=False, *args, **kwargs)[source]

Bases: gnes.indexer.base.BaseDocIndexer

add(keys, docs, *args, **kwargs)[source]

adding new docs and their protobuf representation

Parameters:
  • keys (List[int]) – list of doc_id
  • docs (List[Document]) – list of protobuf Document objects
close()[source]

Release the resources as model is destroyed

post_init()[source]

Declare class attributes/members that can not be serialized in standard way

query(keys, *args, **kwargs)[source]
Return type:List[Document]
scan(reversed_scan=False)[source]
train(*args, **kwargs)

Train the model, need to be overrided