1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
| package com.ruoyi;
|
|
|
|
|
| import com.ruoyi.service.esService;
| import org.elasticsearch.client.IndicesClient;
|
| import org.junit.jupiter.api.Test;
| import org.springframework.beans.factory.annotation.Autowired;
| import org.springframework.boot.test.context.SpringBootTest;
|
|
| @SpringBootTest
| public class esTest {
| @Autowired
| private esService ess;
|
| @Test
| public void esUser()
| {
| // request.settings(Settings.builder().put("number_of_shards", "1").put("number_of_replicas", "0"));
| // request.settings(Settings.builder().put("number_of_shards", "1").put("number_of_replicas", "0"));
| }
| @Test
| public void esUs()
| {
| // 操作索引的对象
| System.out.println(ess);
|
| // ess.insertTable("lis");
|
|
|
| }
|
| }
|
|