Closed joao-conde closed 4 years ago
@jonotron unit test added
@joao-conde Thanks for the fix and the test! Good luck with the rest of Hacktoberfest!
Thanks @jonotron. I opened the first one roughly a year ago when I was actually building something with ReactSearchLunr
and at the time fixed it for myself like this. Glad to contribute to open source, even outside of Hacktoberfest!
@joao-conde Yes, I noticed that first PR was from 2019. Are you still building that project? Are you able to share? Would love to see where this little project is getting used.
@jonotron sadly it is closed source and belongs to my old company :/
This PR is a re-opening of #39.
The ID key of each entry may not be
id
, so looking forwill fail if the key is for example named
name
or something else.Instead, using
will work even if the id field is named anything other then
id
A unit test was also added, testing if the results are correct when using as id the
name
field: