capreolus.index

Package Contents

Classes

Index Base class for Index modules. The purpose of an Index module is to represent an inverted index that can be queried with a Searcher module and used to obtain documents and collection statistics.
capreolus.index.logger[source]
class capreolus.index.Index(config=None, provide=None, share_dependency_objects=False, build=True)[source]

Bases: capreolus.ModuleBase

Base class for Index modules. The purpose of an Index module is to represent an inverted index that can be queried with a Searcher module and used to obtain documents and collection statistics.

Modules should provide:
  • a _create_index method that creates an index on the Collection dependency
  • a get_doc(docid) and a get_docs(docid) method
  • a get_df(term) method
module_type = index[source]
dependencies[source]
get_index_path(self)[source]
exists(self)[source]
create_index(self)[source]
get_doc(self, doc_id)[source]
get_docs(self, doc_ids)[source]