class documentation

class IndexBuilder:

View In Hierarchy

Helper class that creates a search index based on the doctrees passed to the feed method.
Method __init__ Undocumented
Method context​_for​_searchtool Undocumented
Method dump Dump the frozen index to a stream.
Method feed Feed a doctree to the index.
Method freeze Create a usable data structure for serializing.
Method get​_js​_stemmer​_code Returns JS code that will be inserted into language_data.js.
Method get​_js​_stemmer​_rawcode Undocumented
Method get​_js​_stemmer​_rawcodes Returns a list of non-minified stemmer JS files to copy.
Method get​_objects Undocumented
Method get​_terms Undocumented
Method label Undocumented
Method load Reconstruct from frozen data.
Method prune Remove data for all docnames not in the list.
Class Variable formats Undocumented
Instance Variable ​_filenames Undocumented
Instance Variable ​_mapping Undocumented
Instance Variable ​_objnames Undocumented
Instance Variable ​_objtypes Undocumented
Instance Variable ​_stem​_cache Undocumented
Instance Variable ​_title​_mapping Undocumented
Instance Variable ​_titles Undocumented
Instance Variable env Undocumented
Instance Variable js​_scorer​_code Undocumented
Instance Variable js​_splitter​_code Undocumented
Instance Variable lang Undocumented
def __init__(self, env, lang, options, scoring):

Undocumented

Parameters
env:BuildEnvironmentUndocumented
lang:strUndocumented
options:DictUndocumented
scoring:strUndocumented
def context_for_searchtool(self):

Undocumented

Returns
Dict[str, Any]Undocumented
def dump(self, stream, format):
Dump the frozen index to a stream.
Parameters
stream:IOUndocumented
format:AnyUndocumented
def feed(self, docname, filename, title, doctree):
Feed a doctree to the index.
Parameters
docname:strUndocumented
filename:strUndocumented
title:strUndocumented
doctree:nodes.documentUndocumented
def freeze(self):
Create a usable data structure for serializing.
Returns
Dict[str, Any]Undocumented
def get_js_stemmer_code(self):
Returns JS code that will be inserted into language_data.js.
Returns
strUndocumented
def get_js_stemmer_rawcode(self):

Undocumented

Returns
Optional[str]Undocumented
def get_js_stemmer_rawcodes(self):
Returns a list of non-minified stemmer JS files to copy.
Returns
List[str]Undocumented
def get_objects(self, fn2index):

Undocumented

Parameters
fn2index:Dict[str, int]Undocumented
Returns
Dict[str, List[Tuple[int, int, int, str, str]]]Undocumented
def get_terms(self, fn2index):

Undocumented

Parameters
fn2index:DictUndocumented
Returns
Tuple[Dict[str, List[str]], Dict[str, List[str]]]Undocumented
def label(self):

Undocumented

Returns
strUndocumented
def load(self, stream, format):
Reconstruct from frozen data.
Parameters
stream:IOUndocumented
format:AnyUndocumented
def prune(self, docnames):
Remove data for all docnames not in the list.
Parameters
docnames:Iterable[str]Undocumented
formats =

Undocumented

_filenames =

Undocumented

_mapping =

Undocumented

_objnames: Dict[int, Tuple[str, str, str]] =

Undocumented

_objtypes: Dict[Tuple[str, str], int] =

Undocumented

_stem_cache: Dict[str, str] =

Undocumented

_title_mapping =

Undocumented

_titles =

Undocumented

env =

Undocumented

js_scorer_code =

Undocumented

js_splitter_code =

Undocumented

lang: SearchLanguage =

Undocumented