Why i get different result when i use term and match

GET /logstash(2018.03.31)/_search
{
"query":{
"bool":{
"must":[
{"match":{"MSG":"PayResult"}
}
],
"must_not": [
{ "match": {
"PayResult":"Leave"}}
]
}
},"size":0,
"aggs": {
"sed_terms": {
"terms": {
"field": "PayID.keyword",
"size": 347
},
"aggs": {
"min_time": {
"top_hits": {
"sort": [
{
"@timestamp": {
"order": "desc"
}
}
]
, "size": 1
}
},
"max_time": {
"max": {
"field": "@timestamp"
}
}
}
}
}
}
i need match some fields but it tell me only one match
so i search .they tell me i need use term ,when i use term i can't get result

Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:

```
CODE
```

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.

Anyway, match analyze the text. term does not.

thank you i have found my problem

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.