Hello, first post here and it’s probably a simple issue but any help would be appreciated.
I’m using easy search to search over a collection, and each entry in this collection has a few fields I’d like users to be able to search by (the title or author of a book, for example). However, currently I can only search by title, despite looking like I’ve set it up correctly. Here’s what I have:
`Books = new Mongo.Collection('books');
BooksIndex = new EasySearch.Index({
collection: Books,
fields: ['isbn', 'title', 'author'],
engine: new EasySearch.Minimongo()
});
Template.buySearch.helpers({
booksIndex: () => BooksIndex
});
And then a simple search page:
<template name="buySearch">
<div class="container">
<div class="home">
{{> EasySearch.Input index=booksIndex}}
<ul>
{{#EasySearch.Each index=booksIndex}}
{{> bookItem}}
{{/EasySearch.Each}}
</ul>
{{> EasySearch.LoadMore index=booksIndex}}
{{#EasySearch.IfNoResults index=booksIndex}}
<div class="no-results">No results found!</div>
{{/EasySearch.IfNoResults}}
</div>
</div>
</template>
Sorry for the long post. Any idea why the search input is currently only showing results if I input the book title? Nothing for isbn or author. Thanks in advance for any help or suggestions!