I have an application where MongoDB is used as primary data store and Elasticsearch for all the searches. Now I'm not sure how to do mapping properly because when annotating the model class with both MongoDB and Elasticsearch @Document annotations(as on the example below) I'm getting the error as follows.
Caused by: org.springframework.data.mapping.PropertyReferenceException: No property insert found for type Customer!
// my model definition excerpt
@org.springframework.data.mongodb.core.mapping.Document(collection="companies")
@org.springframework.data.elasticsearch.annotations.Document(indexName = "netnotes", type = "company")
public class Customer implements Serializable{
....
}
My questions is the same as here How to modeling when use Spring data mongo and Spring data elasticearch? but there is no answer ...