【发布时间】:2020-12-18 03:01:32
【问题描述】:
我必须搜索 文本字段“正文” 包含“SAN 订阅者余额”并排除“调用 reip-adapter 后未找到”的文档。我在 Kibana 中创建 KQL 请求:
正文:“SAN 订阅者的余额”而不是正文:“调用 reip-adapter 后未找到”
但结果包括两个条件:“SAN 的订阅者余额”和“调用 reip-adapter 后未找到”。为什么在我的结果中出现“使用 SAN 的订阅者的余额”和“在调用 reip-adapter 后找不到”?
"query": {
"bool": {
"must": [],
"filter": [
{
"bool": {
"filter": [
{
"bool": {
"should": [
{
"match_phrase": {
"Body": "Balance for subscriber with SAN"
}
}
],
"minimum_should_match": 1
}
},
{
"bool": {
"must_not": {
"bool": {
"should": [
{
"match_phrase": {
"Body": "was not found after invoking reip-adapter"
}
}
],
"minimum_should_match": 1
}
}
}
}
]
}
},
{
"range": {
"Timestamp": {
"format": "strict_date_optional_time",
"gte": "2020-08-29T08:24:55.067Z",
"lte": "2020-08-29T10:24:55.067Z"
}
}
}
],
"should": [],
"must_not": []
}
}
“而不是”条件不起作用,响应:
-----omitted--------
"_source": {
"prospector": {},
"Severity": "INFO",
"uuid": "e71b207a-42a6-4b2c-98d1-b1094c578776",
"Body": "Balance for subscriber with SAN=0400043102was not found after invoking reip-adapter.",
"tags": [
"iptv",
"beats_input_codec_plain_applied"
],
"source": "/applogs/Iptv/app.log",
"host": {
"name": "e38"
},
"offset": 23097554,
"pid": "2473",
"Configuration": "IptvFacadeBean",
"Timestamp": "2020-08-29T10:24:50.040Z",
"@timestamp": "2020-08-29T10:24:50.446Z",
"input": {}
}
-----omitted--------
【问题讨论】:
-
如果它帮助您解决了您的问题,您能否点赞并接受我的回答:)
标签: elasticsearch lucene kibana