These methods are very different from the ones we designed in MongoDB. Here are the differences:
- MongoDB methods had stringent validations. Validations are not required for Elasticsearch as the master (command model or golden source) is assumed to be updated and we have to apply the updates to the query model.
- Any error in updating the query model has to be alerted, and should not go unnoticed. We will look at that aspect in the chapters ahead.
- We do not separate the insert and update method. The single save method suffices for both purposes due to our ProductRepository class.
- Also, these methods do not have to be exposed as REST HTTP services, as they might not be called directly other than through message ...