Further optimization to ES queries / performance

We have been very pleased with ES performance, but wondering is there a way to increase search performance even further? When running performance tests against ES cluster, the cluster is not the bottleneck and has enough power. The tests are ran in 20 iterations with multiple users querying the cluster at the same time. We have 10 million documents on ES and the document size varies from 9kb to 600kb.

Slowest queries that return the default size of 5000 documents (but query matches ~8million documents) take from 0.5s to 1.5s seconds.

We are running 4 nodes and 3 replicas with a shard count of 1.

We run the queries in filter context as we do not need scoring and we would like frequently used filters to be cached.

A query that would return a lot of data in our case would look like this:

GET index/_search
{
  "query": {
    "bool": {
      "filter": [
        {
          "terms": {
            "someField": [
              "0",
              "1"
            ]
          }
        },
        {
          "terms": {
            "someField2": [
              "3",
              "4",
              "0"
            ]
          }
        },
        {
          "match_phrase_prefix": {
            "someField3": "Mich"
          }
        },
        {
          "bool": {
            "should": [
              {
                "prefix": {
                  "someField4": "Test"
                }
              },
              {
                "prefix": {
                  "someField5": "Test"
                }
              }
            ]
          }
        },
        {
          "range": {
            "CreationTime": {
              "gte": "2017-08-08",
              "lte": "2020-10-08"
            }
          }
        }
      ]
    }
  }
}

Is this fine and/or how it can be further optimized? It has quite a bit of clauses, but that is not something we can decrease.

Any help would be greatly appreciated, we have already seen quite massive improvements in performance after taking ES to use.

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