JooLun Plus 百科 ⬇ 源码下载

04.12 Elasticsearch 使用

102353 于 2026-10-17 14:14:33 +08:00 修改了此页面

安装Elasticsearch8.6.1、IK分词器8.6.1

Elasticsearch客户端

<dependency>
	<groupId>co.elastic.clients</groupId>
	<artifactId>elasticsearch-java</artifactId>
    <version>8.6.1</version>
</dependency>			

服务中使用

		<dependency>
			<groupId>com.joolun</groupId>
			<artifactId>joolun-common-es</artifactId>
		</dependency>

配置es

  • nacos中application-dev.yml配置es账号
spring:
  elasticsearch:
    uris: http://test2-es.joolun.com
    username: elastic
    password: sgsgwetewtet
    connection-timeout: 10s