0%

ElasticSearch 创建ik 索引

简单粗暴,代码如下

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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55

{
"setting":{
"number_of_shards":5,
"number_of_replicas":1
},
"mappings":{
"brain":{
"properties":{
"answer":{
"type":"text",
"analyzer":"ik_max_word",
"search_analyzer":"ik_smart"
},
"question":{
"type":"text",
"analyzer":"ik_max_word",
"search_analyzer":"ik_smart"
},
"user_id":{
"type":"text"
},
"create_time":{
"type":"date",
"format":"yyyy-MM-dd HH:mm:ss || yyyy-MM-dd || epoch_millis"
}
}
},
"history":{
"properties":{
"question":{
"type":"text",
"analyzer":"ik_max_word",
"search_analyzer":"ik_smart"
},
"user_id":{
"type":"text"
},
"address":{
"type":"text",
"analyzer":"ik_max_word",
"search_analyzer":"ik_smart"
},
"is_read":{
"type":"text"
},
"create_time":{
"type":"date",
"format":"yyyy-MM-dd HH:mm:ss || yyyy-MM-dd || epoch_millis"
}
}

}
}
}
您的打赏,是我创作的动力!不给钱?那我只能靠想象力充饥了。