I am working on a project which has following setup:
- I have an Amazon EC2 cluster with one master, 3 config servers and 3 shard servers.
- Master has a node.js application running which is basically a REST API written using Express.js module.
- I am using mongodb as database. Master has "mongos" service running which shards the data into 3 shard servers. Those servers have "mongod" service running on them.
With this setup, I want to integrate elasticsearch to perform search queries. To do this I want to add a route in my node.js REST API application to perform search query on the data stored in shards.
Are there any additional steps involved given that I have three shards running on independent machines? How do I configure elasticsearch to access the data from the shards to build index? Does it detect this configuration automatically and builds the index? Can someone please provide me the steps that I should follow to accomplish this?