Lucene query runs slower after upgrade from ES 5.4 to 6.2

After upgrade from ElasticSearch 5.4 to 6.2, we have noticed severe performance degradation in queries we ran from Kibana. The same query which executed faster with 5.4 runs slower after upgrade in ES 6.2.

Kibana 5.6.5
Query:
tags:(Hello, World, Test, Universe) AND NOT "Something" AND "Anything here"

WE have enabled slow logs and the query phase takes close to 5 minutes. There were more documents in ElasticSearch in 5.4 when compared to 6.2. The same query executed within few seconds in 5.4.

Can anyone suggest how to troubleshoot this problem?

We have tried to re-write the query in ElasticSearch query DSL which executes faster. We ran with profile API but the response does not print any profiling information.

Equivalent query:

{
"profile": "true",
"query": {
"bool": {
"should": {
"terms": {
"tags": ["Hello", "World", "Test", "Universe"]
}
},
"must_not": {
"wildcard": {
"tags": "Something"
}
},
"must": {
"wildcard": {
"tags": "Anything here"
}
}
}
}
}

Thanks in advance.

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