class documentation

class MatchData: (source)

View In Hierarchy

Contains and collects metadata about a matching document. A single instance of lunr.MatchData is returned as part of every lunr.Index.Result.

Method __eq__ Undocumented
Method __init__ Undocumented
Method __repr__ Undocumented
Method add Add metadata for a term/field pair to this instance of match data
Method combine An instance of lunr.MatchData will be created for every term that matches a document.
Instance Variable metadata Undocumented
def __eq__(self, other): (source)

Undocumented

def __init__(self, term=None, field=None, metadata=None): (source)

Undocumented

def __repr__(self): (source)

Undocumented

def add(self, term, field, metadata): (source)

Add metadata for a term/field pair to this instance of match data

def combine(self, other): (source)

An instance of lunr.MatchData will be created for every term that matches a document. However only one instance is required in a lunr.Index~Result. This method combines metadata from another instance of MatchData with this object's metadata.

metadata: dict = (source)

Undocumented