elasticSearch 在windows环境下的简单示例

1.下载安装

https://www.elastic.co/cn/downloads/elasticsearch#ga-release

2.启动,进入安装目标下,进入bin目录下,双击elasticsearch.bat


当出现 started,标识启动成功;打开浏览器,输入:http://localhost:9200/ 进行验证

3.新建一个spring boot 项目: https://github.com/lick468/es_demo

3.1 pom.xml 只贴出核心部分,具体参考github项目链接

 <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-elasticsearch</artifactId>
            <version>4.1.5</version>
        </dependency>

4.下载kibana (可选)图示化,下载和elasticsearch一致的版本

https://www.elastic.co/cn/downloads/past-releases#kibana

5.先配置,后启动



原文地址:https://www.cnblogs.com/lick468/p/15480914.html