-
Notifications
You must be signed in to change notification settings - Fork 547
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
How to get the actual records after search? #500
Comments
Hi just collect documents by const result = idx.search(query)
// result as an array of objects (documents)
console.log( result.map(item =>
documents.find(post => item.ref === post.id)
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is some code I'm trying out:
When I run it, the console output is:
I have retrieved the id's for the matching records, but suppose I want the sizes? Shouldn't I be able to use the index to get the matching records themselves?
https://replit.com/@abalter/lunr-search-1
The text was updated successfully, but these errors were encountered: