capreolus.index
¶
Submodules¶
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. |
-
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 theCollection
dependency - a
get_doc(docid)
and aget_docs(docid)
method - a
get_df(term)
method
- a