您当前的位置: 首页 > 慢生活 > 程序人生 网站首页程序人生
elasticSearch通配符,与-
发布时间:2021-08-23 17:02:16编辑:雪饮阅读()
ElasticSearch通配符,可以用来结合多个通配条件。
ElasticSearch通配符-用来对对一个索引进行取反(不包含该索引)的通配行为。
一个具体的实例:
请求正文还像是上篇一样:
{
"query":{
"query_string":{
"query":"CBSE"
}
}
}
响应结果如:
{
"took": 30,
"timed_out": false,
"_shards": {
"total": 2,
"successful": 2,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 2,
"relation": "eq"
},
"max_score": 1.0417082,
"hits": [
{
"_index": "schools",
"_type": "school",
"_id": "1",
"_score": 1.0417082,
"_source": {
"name": "Central School",
"description": "CBSE Affiliation",
"street": "Nagan",
"city": "paprola",
"state": "HP",
"zip": "176115",
"location": [
31.8955385,
76.8380405
],
"fees": 2000,
"tags": [
"Senior Secondary",
"beautiful campus"
],
"rating": "3.5"
}
},
{
"_index": "schools2",
"_type": "school",
"_id": "1",
"_score": 1.0417082,
"_source": {
"name": "Central School",
"description": "CBSE Affiliation",
"street": "Nagan",
"city": "paprola",
"state": "HP",
"zip": "176115",
"location": [
31.8955385,
76.8380405
],
"fees": 2000,
"tags": [
"Senior Secondary",
"beautiful campus"
],
"rating": "3.5"
}
}
]
}
}
该请求表示了:来自所有索引的JSON对象,它们以“school”开头,但不是schools_gov并且在其中有CBSE。
关键字词:elasticSearch,通配符,-
相关文章
- elasticSearch通配符*
- elasticSearch的_all查询关键字(在所有索引中查询)
- 完全群集重新启动与滚动升级以及elasticSearch多索引
- elasticSearch安装及配置elasticSearch默认对外端口
- windows下使用elasticSearch-head为elasticSearch进行
- windows下使用elasticSearch-head为elasticSearch创建
- 配置elasticSearch-head连接elasticSearch服务
- 配置安装elasticSearch-head
- elasticSearch创建映射和添加数据(_bulk批处理)
- elasticSearch创建没有正文的空索引