# Multi match bool query returning 0 hits on large number of documents

**URL:** <https://discuss.elastic.co/t/multi-match-bool-query-returning-0-hits-on-large-number-of-documents/259523>\
**Category:** Elasticsearch\
**Created:** [December 23, 2020, 6:58pm UTC](https://discuss.elastic.co/t/multi-match-bool-query-returning-0-hits-on-large-number-of-documents/259523 "2020-12-23T18:58:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Finley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/finley/32/81314_2.png) [@Finley](https://discuss.elastic.co/u/Finley)\
**Post date:** [December 23, 2020, 6:58pm UTC](https://discuss.elastic.co/t/multi-match-bool-query-returning-0-hits-on-large-number-of-documents/259523/1 "2020-12-23T18:58:53Z")

</div>

Hi,

I have 2 elk cluster in 7.10.

A -\> 70 documents per **hour**  
B -\> 100 - 300 documents per **second** (825k on 1 hour)

When I am doing a KQL search in kibana (discover) with just typing "POST", on the cluster **A** , it's returning all documents in the last 15 min any field that contains the value "POST".

 ![Kibana_KQL](https://us1.discourse-cdn.com/elastic/original/3X/9/7/97ed30fd2d056940b0ebf16de1556c44289b03fc.png)

**When I am doing the same search on the cluster B, 0 hits are returned.**

Kibana is converting the KQL Query into an Elastic Query DSL.

With an inspect, I can see that it's converting like this :

```
"query": {
    "bool": {
      "must": [],
      "filter": [
        {
          "multi_match": {
            "type": "best_fields",
            "query": "POST",
            "lenient": true
          }
        },
        {
          "range": {
            "@timestamp": {
              "gte": "2020-12-23T18:35:04.481Z",
              "lte": "2020-12-23T18:50:04.481Z",
              "format": "strict_date_optional_time"
            }
          }
        }
      ],
      "should": [],
      "must_not": []
    }
  }

```

I guess that it's not working because I have a large number of documents on the cluster B. I didn't find in the documentation why it's returning 0 hits.

Also, with a `simple_query_string`, it works on both cluster (A and B).

```
{
    "query": {
        "simple_query_string" : {
            "query": "POST",
            "fields": ["*"]
        }
    }
} 

```

Which setting should I increase to search on large number of documents with multi\_match ?

Thank you

---

<div class="post-metadata">

**Author:** ![Finley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/finley/32/81314_2.png) [@Finley](https://discuss.elastic.co/u/Finley)\
**Post date:** [December 25, 2020, 8:16pm UTC](https://discuss.elastic.co/t/multi-match-bool-query-returning-0-hits-on-large-number-of-documents/259523/2 "2020-12-25T20:16:18Z")

</div>

Small Up 😇

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 28, 2020, 10:46am UTC](https://discuss.elastic.co/t/multi-match-bool-query-returning-0-hits-on-large-number-of-documents/259523/3 "2020-12-28T10:46:31Z")

</div>

Have you compared the mappings for the field(s) that contain `POST` between the two clusters? Is it possible that they are mapped differently?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 25, 2021, 10:47am UTC](https://discuss.elastic.co/t/multi-match-bool-query-returning-0-hits-on-large-number-of-documents/259523/4 "2021-01-25T10:47:04Z")

</div>

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