How to start elasticsearch 5.1 embedded in my java application?

后端 未结 4 1213
轮回少年
轮回少年 2020-12-03 21:41

With elasticsearch 2.x I used the following code to launch an embedded Node for testing:

@Bean
public Node elasticSearchTestNode() {
    return NodeBuilder.n         


        
4条回答
  •  一整个雨季
    2020-12-03 22:19

    Embedded elasticsearch is not supported anymore

    You can use this maven dependency, it will start elasticsearch 6 cluster for you

    
         org.elasticsearch-6
         elasticsearch-embedded-cluster
         1.0-SNAPSHOT
    
    

    You can read more details on https://github.com/nitishgoyal13/elasticsearch-6-embedded-cluster

提交回复
热议问题