Closed SoSufi closed 7 years ago
I'm trying to create a index for array values in my collection but I'm getting errors in creating such an index.
My Collection is { "_id" : ObjectId("573ae8718d1a32ab1bcdc5aa"), "Categories" : [ { "categoryNo" : "1", "faq" : [ { "questionNo" : "1", "question" : "What is the quality ",}] }]}
below I'm trying to create index to search question.
FaqsIndex = new EasySearch.Index({ collection: Faqs, fields: ['Faqs.Categories.faq.question'], engine: new EasySearch.MongoDB({ }), defaultSearchOptions: { limit: 10 }, permission: () => { //console.log(Meteor.userId());
return true;
} });
Please point me to the correct direction.
For complex use cases try to simplify your data structure (denormalize) or do [following(http://matteodem.github.io/meteor-easy-search/docs/recipes/).
I'm trying to create a index for array values in my collection but I'm getting errors in creating such an index.
My Collection is { "_id" : ObjectId("573ae8718d1a32ab1bcdc5aa"), "Categories" : [ { "categoryNo" : "1", "faq" : [ { "questionNo" : "1", "question" : "What is the quality ",}] }]}
below I'm trying to create index to search question.
FaqsIndex = new EasySearch.Index({ collection: Faqs, fields: ['Faqs.Categories.faq.question'], engine: new EasySearch.MongoDB({ }), defaultSearchOptions: { limit: 10 }, permission: () => { //console.log(Meteor.userId());
} });
Please point me to the correct direction.