I want to create a Js Search index in a Node app, then use this index in a client-side JavaScript app.
It's not clear to me from the README or the benchmark code how to do this.
I've tried this:
// docs is an array of objects, each with a name, title and description
var search = new jsSearch.Search('name');
search.addIndex('title');
search.addIndex('description');
search.addDocuments(docs);
...and this:
var search = new jsSearch.Search('name');
search.searchIndex = new jsSearch.TfIdfSearchIndex('name');
search.addIndex('title');
search.addIndex('description');
search.addDocuments(docs);
...but how can I access the index at that point?