nordlys.core.retrieval.elastic_cache module¶
Elastic Cache¶
This is a cache for elastic index stats; a layer between an index and retrieval. The statistics (such as document and term frequencies) are first read from the index and stay in the memory for further usages.
Usage hints¶
- Only one instance of Elastic cache needs to be created.
- If running out of memory, you need to create a new object of ElasticCache.
- The class also caches termvectors. To further boost efficiency, you can load term vectors for multiple documents using
ElasticCache.multi_termvector().
| Author: | Faegheh Hasibi |
|---|
-
class
nordlys.core.retrieval.elastic_cache.ElasticCache(index_name)[source]¶ Bases:
nordlys.core.retrieval.elastic.Elastic-
coll_term_freq(term, field, tv=None)[source]¶ Returns collection term frequency for the given field.
-