I may not really understand the scoring issue but here is my problem. I have a bool query. I am looking particular devices (a_device_hostname) with the other characteristics in the must clause.
{
"size": 10,
"_source": "a_device_hostname",
"query": {
"bool": {
"must": [
{
"match": {
"tags": "smarts"
}
},
{
"match": {
"a_device_hostname" : "WL-MIELI-ADC-B14-WISM8"
}
},
{
"match_phrase": {
"message": "Down"
}
},
{
"query_string": {
"default_field": "event_from",
"query": "event_from:/.*PR.*/"
}
}
],
"filter": {
"range": {
"@timestamp": {
"gte": "now-7d",
"lte": "now"
}
}
}
}
},
"aggs": {
"cats": {
"date_histogram": {
"field": "@timestamp",
"interval": "1h"
}
}
}
}
But I'm getting some other devices in the return
{
"took": 605,
"timed_out": false,
"_shards": {
"total": 698,
"successful": 698,
"skipped": 635,
"failed": 0
},
"hits": {
"total": 93,
"max_score": 27.254362,
"hits": [
{
"_index": "igemsbigdata-unicredit-2020.12",
"_type": "doc",
"_id": "ql_77XABbSnlRFWQ6mOB",
"_score": 27.254362,
"_source": {
"a_device_hostname": "SW-MIELI-ADC-B14-WIFI-1"
}
},
{
"_index": "igemsbigdata-unicredit-2020.12",
"_type": "doc",
"_id": "sF_77XABbSnlRFWQ6mOB",
"_score": 26.743238,
"_source": {
"a_device_hostname": "SW-MIELI-ADC-B14-WIFI-1"
}
},
{
"_index": "igemsbigdata-unicredit-2020.12",
"_type": "doc",
"_id": "M1QF43ABbSnlRFWQynoG",
"_score": 24.763958,
"_source": {
"a_device_hostname": "RT-MIELI-ADC-B28-VOIPNEW"
}
},
{
"_index": "igemsbigdata-unicredit-2020.12",
"_type": "doc",
"_id": "O0cB43ABbSnlRFWQOTci",
"_score": 24.68473,
"_source": {
"a_device_hostname": "RT-MIELI-ADC-B28-VOIPNEW"
}
},
Is there something I'm not understanding about the must clause?
Thanks in advance
Norm