Get surrounding text?
mah5057 opened this issue · comments
Matt Hardock commented
Is there a way to obtain the match data for a result, so that in the display one could show an excerpt from returned documents where a match was found?
If not, is there a way to get a more recent lunr version? The version here is v0.7.2, but it would be nice to be able to use the lunr matchData property found in later search result classes (https://lunrjs.com/docs/lunr.Index.html#~Result), in order to obtain data on the actual match, rather than just the document that matched. As of 0.7.2 it doesn't appear that that prop has been added:
ref: 13
score: 0.000047381886787789616