# QueryStringQuery interpretation bug ES 6.2.4

**URL:** <https://discuss.elastic.co/t/querystringquery-interpretation-bug-es-6-2-4/143303>\
**Category:** Elasticsearch\
**Created:** [August 7, 2018, 10:32am UTC](https://discuss.elastic.co/t/querystringquery-interpretation-bug-es-6-2-4/143303 "2018-08-07T10:32:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![klimapet](https://avatars.discourse-cdn.com/v4/letter/k/e47774/32.png) [@klimapet](https://discuss.elastic.co/u/klimapet)\
**Post date:** [August 7, 2018, 10:32am UTC](https://discuss.elastic.co/t/querystringquery-interpretation-bug-es-6-2-4/143303/1 "2018-08-07T10:32:25Z")

</div>

Hi,  
I´ve run into problems after upgrading Elastic from 5.6.3 to 6.2.4 using QueryStringQuery. Apparently the new version has some issue in interpretation of search query when addressing specific field to search in.

Let´s say I want to find documents, that have "someValue" in specific field and "test" word anywhere else. I´m using QueryStringQuery with type:cross\_fields setting. The index doesn´t have \_all field, as it is deprecated in ES v6.

If the query is  
`test some_field:someValue`  
then it returns nothing.

If the query is:  
`some_field:someValue test`  
then results are quite as expected.

I´ve tried using \_validate API with explain parameter to get these results.

**For the first (wrong) case:**  
`{ "valid" : true, "_shards" : { "total" : 1, "successful" : 1, "failed" : 0 }, "explanations" : [{ "index" : "the_index", "valid" : true, "explanation" : "+(+(blended(terms:[ field1:test, field2:test, ... fieldX:test]) | MatchNoDocsQuery(\"failed [fieldY] query, caused by illegal_argument_exception:[Cannot search on field [fieldY] since it is not indexed.]\") | ()~1.0) +()~1.0) #*:*" } ] }`

**For the second (correct) case:**  
`{ "valid" : true, "_shards" : { "total" : 1, "successful" : 1, "failed" : 0 }, "explanations" : [{ "index" : "the_index", "valid" : true, "explanation" : "+(+some_field:someValue +(blended(terms:[ field1:test, field2:test, ... fieldX:test]) | MatchNoDocsQuery(\"failed [fieldY] query, caused by illegal_argument_exception:[Cannot search on field [fieldY] since it is not indexed.]\") | ()~1.0)) #*:*" } ] }`

It used to work in 5.6.3 and I can´t find anything wrong with my query, so I guess it is new fault. Or is there any reasonable explanation for this different behavior? Thank you.

---

<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:** [September 4, 2018, 10:32am UTC](https://discuss.elastic.co/t/querystringquery-interpretation-bug-es-6-2-4/143303/2 "2018-09-04T10:32:27Z")

</div>

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