Using the MongoDB river
MongoDB is a very common NoSQL data storage system used all over the world. One of the main things that it lacks is that it was not designed for text searching.
Although the latest MongoDB version provides full-text search, its completeness and functionality are, by far, more limited than the current ElasticSearch version. So, it's quite common to use MongoDB as the data store and ElasticSearch to search. The MongoDB river, initially developed by me and now maintained by Richard Louapre, helps to create a bridge between these two applications.
Getting ready
You will need a working ElasticSearch cluster and a working MongoDB instance installed on the same machine as ElasticSearch, with replica sets enabled (http://docs.mongodb.org/manual/tutorial/deploy-replica-set/ and http://docs.mongodb.org/manual/tutorial/convert-standalone-to-replica-set/). You need to restore the sample data available in mongodb/data
with the following command:
mongorestore –d escookbook...