I\'m developing a system which is planning to use elasticsearch as an data repository. I\'m trying to choose the best way to develop my application that can index and query data
You can use IndexQuery for save AND update:
public Serializable saveOrUpdate(Car car) { return template.index(new IndexQueryBuilder().withObject(car).build()); }