Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indicating which field was matched on during search #91

Open
mgramigna opened this issue Oct 17, 2018 · 3 comments
Open

Indicating which field was matched on during search #91

mgramigna opened this issue Oct 17, 2018 · 3 comments

Comments

@mgramigna
Copy link

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?

@marvinjude
Copy link

What's your actual use case?

@marvinjude
Copy link

The document(s) returned are the actual matches

@groe
Copy link

groe commented Nov 30, 2018

That's possible with lunr but unfortunately not this elasticlunr (at least I could not find a way to do it).

Related: #96

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants