new MatchData()
Contains and collects metadata about a matching document. A single instance of lunr.MatchData is returned as part of every lunr.Index~Result.
Properties:
| Name | Type | Description |
|---|---|---|
terms |
Array.<string> | All the query terms that the document matched. |
metadata |
object | A collection of metadata associated with this document. |
- Source:
- See:
Methods
combine(otherMatchData)
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 lunr.MatchData with this objects metadata.
Parameters:
| Name | Type | Description |
|---|---|---|
otherMatchData |
lunr.MatchData | Another instance of match data to merge with this one. |
- Source:
- See: