The Best way to use ElasticSearch in Spring java framework

前端 未结 4 1785
梦谈多话
梦谈多话 2021-01-31 04:24

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

4条回答
  •  死守一世寂寞
    2021-01-31 05:17

    You can use IndexQuery for save AND update:

    public Serializable saveOrUpdate(Car car) {
        return template.index(new IndexQueryBuilder().withObject(car).build());
    }
    

提交回复
热议问题