-
Notifications
You must be signed in to change notification settings - Fork 135
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
Search a document which contains an array #264
Comments
Hi @JedCarrNV , In case it should be considered a single document, you can specify a custom const miniSearch = new MiniSearch({
fields: ['first', 'last', 'info'],
extractField: (doc, fieldName) => {
if (fieldName === 'info') {
return doc.info.map((entry) => entry.title).join(' ')
} else {
return doc[fieldName]
}
}
}) Does this solve your issue? |
My comment above should answer the original question, so I will go on and close this issue, but @JedCarrNV feel free to comment if you have more questions. |
Hi,
I have the following document
How do I search/extract title from the info array?
Thanks!
The text was updated successfully, but these errors were encountered: