class documentation

class IndexBuilder: (source)

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 env Undocumented
Instance Variable js_scorer_code Undocumented
Instance Variable js_splitter_code Undocumented
Instance Variable lang Undocumented
Method _word_collector Undocumented
Instance Variable _all_titles Undocumented
Instance Variable _filenames Undocumented
Instance Variable _index_entries Undocumented
Instance Variable _mapping Undocumented
Instance Variable _objnames Undocumented
Instance Variable _objtypes Undocumented
Instance Variable _title_mapping Undocumented
Instance Variable _titles Undocumented
def __init__(self, env, lang, options, scoring): (source)

Undocumented

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

Undocumented

Returns
dict[str, Any]Undocumented
def dump(self, stream, format): (source)

Dump the frozen index to a stream.

Parameters
stream:IOUndocumented
format:AnyUndocumented
def feed(self, docname, filename, title, doctree): (source)

Feed a doctree to the index.

Parameters
docname:strUndocumented
filename:strUndocumented
title:strUndocumented
doctree:nodes.documentUndocumented
def freeze(self): (source)

Create a usable data structure for serializing.

Returns
dict[str, Any]Undocumented
def get_js_stemmer_code(self): (source)

Returns JS code that will be inserted into language_data.js.

Returns
strUndocumented
def get_js_stemmer_rawcode(self): (source)

Undocumented

Returns
str|NoneUndocumented
def get_js_stemmer_rawcodes(self): (source)

Returns a list of non-minified stemmer JS files to copy.

Returns
list[str]Undocumented
def get_objects(self, fn2index): (source)

Undocumented

Parameters
fn2index:dict[str, int]Undocumented
Returns
dict[str, list[tuple[int, int, int, str, str]]]Undocumented
def get_terms(self, fn2index): (source)

Undocumented

Parameters
fn2index:dictUndocumented
Returns
tuple[dict[str, list[str]], dict[str, list[str]]]Undocumented
def label(self): (source)

Undocumented

Returns
strUndocumented
def load(self, stream, format): (source)

Reconstruct from frozen data.

Parameters
stream:IOUndocumented
format:AnyUndocumented
def prune(self, docnames): (source)

Remove data for all docnames not in the list.

Parameters
docnames:Iterable[str]Undocumented

Undocumented

Undocumented

js_scorer_code = (source)

Undocumented

js_splitter_code: str = (source)

Undocumented

def _word_collector(self, doctree): (source)

Undocumented

Parameters
doctree:nodes.documentUndocumented
Returns
WordStoreUndocumented
_all_titles = (source)

Undocumented

_filenames = (source)

Undocumented

_index_entries: dict[str, list[tuple[str, str, str]]] = (source)

Undocumented

_mapping = (source)

Undocumented

Undocumented

Undocumented

_title_mapping = (source)

Undocumented

Undocumented