elasticlunr.js
elasticlunr.js copied to clipboard
Indicating which field was matched on during search
Is there any way to know which field was matched on to cause a search result to appear? For example, if I had the following document in the index,
{
field1: 'some value',
field2: 'another one'
}
and I run idx.search('some')
, it should match on field1
. Is there any way to know that it matched on field1
and not field2
?
What's your actual use case?
The document(s) returned are the actual matches
That's possible with lunr but unfortunately not this elasticlunr (at least I could not find a way to do it).
Related: #96