【发布时间】:2021-03-25 12:11:54
【问题描述】:
我正在尝试过滤所有包含“@”、“.”、“/”等特殊字符的数据。但无法成功。
我愿意获取包含 @ 或点 (.) 的城市,所以我需要一个查询来为我提供包含特殊字符的输出。
我是 Elasticsearch 查询的新手。所以请帮助我。
谢谢
下面是索引:
"hits" : {
"total" : 4,
"max_score" : 1.0,
"hits" : [
{
"_index" : "student",
"_type" : "data",
"_id" : "2",
"_score" : 1.0,
"_source" : {
"name" : "Mirja",
"city" : "pune @ bandra",
"contact number" : 9723124343
}
},
{
"_index" : "student",
"_type" : "data",
"_id" : "4",
"_score" : 1.0,
"_source" : {
"name" : "Rohan",
"city" : "BBSR /. patia",
"contact number" : 9723124343
}
},
{
"_index" : "student",
"_type" : "data",
"_id" : "1",
"_score" : 1.0,
"_source" : {
"name" : "Diya",
"city" : "pune_bandra",
"contact number" : 9723124343
}
}
}
]
}
}```
【问题讨论】:
标签: elasticsearch elasticsearch-query