gnes.indexer.doc.leveldb module

class gnes.indexer.doc.leveldb.AsyncLVDBIndexer(data_path: str, keep_na_doc: bool = True, drop_raw_bytes: bool = False, drop_chunk_blob: bool = False, *args, **kwargs)[source]

Bases: gnes.indexer.doc.leveldb.LVDBIndexer

add(keys: List[int], docs: List[gnes_pb2.Document], *args, **kwargs)[source]

adding new docs and their protobuf representation :param keys: list of doc_id :param docs: 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(*args, **kwargs) → List[Any][source]
train(*args, **kwargs)

Train the model, need to be overrided

class gnes.indexer.doc.leveldb.LVDBIndexer(data_path: str, keep_na_doc: bool = True, drop_raw_bytes: bool = False, drop_chunk_blob: bool = False, *args, **kwargs)[source]

Bases: gnes.indexer.base.BaseDocIndexer

add(keys: List[int], docs: List[gnes_pb2.Document], *args, **kwargs)[source]

adding new docs and their protobuf representation :param keys: list of doc_id :param docs: 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: List[int], *args, **kwargs) → List[gnes_pb2.Document][source]
train(*args, **kwargs)

Train the model, need to be overrided