1 Star 0 Fork 0

杨体评/campus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
kibana.txt 2.43 KB
一键复制 编辑 原始数据 按行查看 历史
杨体评 提交于 2024-04-15 11:42 . Changes
需要提前在虚拟机创建elasticsearch和kibana,并且加入统一网络,在kibana中配置文档
GET _search
{
"query": {
"match_all": {}
}
}
GET /campus/_search
{
"query": {
"match": {
"all": "后营2"
}
}
}
GET /campus/_analyze
{
"analyzer": "completion_analyzer",
"text": "一瓶"
}
GET /campus/_search
{
"query": {
"match_all": {}
}
}
GET /campus/_search
{
"query": {
"bool": {
"must": [
{
"match": {
"all": "后营2"
}
}
],
"must_not": [
{
"match": {
"userId": "17"
}
}
]
}
}
}
DELETE /campus
#社区
PUT /campus
{
"settings": {
"analysis": {
"analyzer": {
"text_anlyzer": {
"tokenizer": "ik_max_word",
"filter": "py"
},
"completion_analyzer": {
"tokenizer": "ik_max_word",
"filter": "py"
}
},
"filter": {
"py": {
"type": "pinyin",
"keep_full_pinyin": true,
"keep_joined_full_pinyin": true,
"keep_original": true,
"limit_first_letter_length": 16,
"remove_duplicated_term": true,
"none_chinese_pinyin_tokenize": false,
"keep_first_letter": true
}
}
}
},
"mappings": {
"properties": {
"id":{
"type": "keyword"
},
"name":{
"type": "text",
"analyzer": "text_anlyzer",
"search_analyzer": "ik_max_word",
"copy_to": "all"
},
"address":{
"type": "text",
"analyzer": "ik_smart",
"copy_to": "all"
},
"shopDesc":{
"type": "text",
"analyzer": "ik_smart",
"copy_to": "all"
},
"price":{
"type": "integer",
"index": false
},
"pic":{
"type": "keyword",
"index": false
},
"userId":{
"type": "keyword"
},
"sendId":{
"type": "keyword",
"index": false
},
"starTime":{
"type": "keyword",
"index": false
},
"endTime":{
"type": "keyword",
"copy_to": "all",
"index": false
},
"all":{
"type": "text",
"analyzer": "text_anlyzer",
"search_analyzer": "ik_smart"
},
"suggestion":{
"type": "completion",
"analyzer": "completion_analyzer"
}
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yang-ti-ping/campus.git
git@gitee.com:yang-ti-ping/campus.git
yang-ti-ping
campus
campus
master

搜索帮助