Im quite a newbie when it comes to DBs and search so please bear with me. Im trying to implement a search function in Meteor app. Ive checked through atmosphere and chanced upon these 4 options.
My needs are for a simple search, able to handle larger data sets that may have data nesting. For example a task, may have comments or links etc. (Full text and more than regex query will be good)
I read that for easy search, even with some form of elastic or Mongodb application, seems to be application only for a single Mongo collection?For example what if I wanted to search across
Dinosaurs = new Meteor.Collection('dinosaurs');
and
Mammals = new Meteor.Collection('mammals');
?
Appreciate any advice on the pros and cons on the 4 options above? 1 seems relative easy to implement but I,m not sure what it means by using elastic engine here. If I were to implement elastic, how do I go about doing it in Meteor? And would it differ from implementing a Elasticsearch HTTP API?
Similarly for Search Source, it supports Elastic too here. Honestly I have no clue on the differences.
This github project demonstrates how to use Meteor with ElasticSearch (not Mongo) for search applications
https://github.com/hharnisc/meteor-elasticsearch-demo/tree/master/elasticsearch-demo/packages/elastic-collection
it basically links a field to a session variable which triggers search on elastic. results are stored in a mongo collection that is pushed to the client through the Meteor mechanics. These are much smaller than the dataset and therefore are quick to update.
As far as searching accross collections, this is a typical problem of database schema definition. If you need to do joins, a mongodb is not the best solution. and relational DB like any SQL DB would be better suited, However, you should be looking into 'denormalization' of your data to see if you can create a structure that will work well for your use case.
This article explains what this means pretty well:
http://blog.mongodb.org/post/87892923503/6-rules-of-thumb-for-mongodb-schema-design-part-2
Good luck.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With