"AND (null) AND" in query string


#1

Hi there,

We have recently upgraded from Elasticsearch 1.6 to 6.2, and a query string that used to work have stopped working.

the query looks like this:
{
"query": {
"bool": {
"must": {
"query_string": {
"default_operator": "AND",
"query": "paper AND & AND pencil"
}
}
}
}
}

Using the explain endpoint we were able to find out that the ampersand always gets stripped from the query string before being searched, so it becomes "paper AND AND pencil". In the previous version 1.6, the search was able to still return results with the two other words. However in the new version, ES is searching the null value between the ANDs and will not return any results.

Is this expected behaviour for the new version?

Thanks in advance!
Jenna


(Jimferenczi) #2

This is a bug and the fix has been released in es 6.3:


You should upgrade to the latest 6x :wink:


#3

Thank you so much for your help! :slight_smile:


(system) #4

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