# Elasticsearch \[6.8.23\] does not return results when I query in a specific field

**URL:** <https://discuss.elastic.co/t/elasticsearch-6-8-23-does-not-return-results-when-i-query-in-a-specific-field/302704>\
**Category:** Elasticsearch\
**Created:** [April 19, 2022, 10:06am UTC](https://discuss.elastic.co/t/elasticsearch-6-8-23-does-not-return-results-when-i-query-in-a-specific-field/302704 "2022-04-19T10:06:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![joanjanku2000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joanjanku2000/32/104542_2.png) [@joanjanku2000](https://discuss.elastic.co/u/joanjanku2000)\
**Post date:** [April 19, 2022, 10:06am UTC](https://discuss.elastic.co/t/elasticsearch-6-8-23-does-not-return-results-when-i-query-in-a-specific-field/302704/1 "2022-04-19T10:06:48Z")

</div>

Hi Everyone,

I am running an issue after I upgraded my Elastic Cluster from 5.1.1 to 6.8.23.

When I search everything in an index using this API:

> /index\_0003/\_search

it returns all the result as expected.

However when I search for something it only searches through only one field of the mapping and not the other ones.

Suppose the \_source has the following mapping:

```auto
"_source": {
              "foo": "FOO_TEST",
              "boo": "BOO_TEST",
              "bar": "BAR_TEST"                   
            }

```

When i search for BOO\_TEST it returns the result. However, If i search BAR\_TEST or FOO\_TEST it returns nothing. Even If I set the specific field to query to bar or foo and specify "\*\*" (to return everything) it returns nothing. Following is the query. (I doubt the query is faulty since this same query works perfectly with indexes created using 5.1.1 Client)

```auto

{
    "from": 0,
    "size": 100,
    "query": {
        "bool": {
            "should": null,
            "disable_coord": true,
            "adjust_pure_negative": true,
            "boost": 1.0,
            "must": [
                {
                    "bool": {
                        "should": [
                            {
                                "query_string": {
                                    "query": "+**",
                                    "fields": ["bar"],
                                    "use_dis_max": true,
                                    "tie_breaker": 1.1,
                                    "default_operator": "or",
                                    "analyzer": "standard",
                                    "auto_generate_phrase_queries": false,
                                    "fuzziness": "AUTO",
                                    "fuzzy_prefix_length": 0,
                                    "fuzzy_max_expansions": 1000,
                                    "phrase_slop": 0,
                                    "escape": false,
                                    "split_on_whitespace": true,
                                    "boost": 1.0
                                }
                            }
                        ],
                        "disable_coord": true,
                        "adjust_pure_negative": true,
                        "boost": 1.0
                    }
                }
            ]
        }
    }

```

Thanks in advance. :)))

---

<div class="post-metadata">

**Author:** ![anime\_lover](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anime_lover/32/100265_2.png) [@anime\_lover](https://discuss.elastic.co/u/anime_lover)\
**Post date:** [April 19, 2022, 11:21am UTC](https://discuss.elastic.co/t/elasticsearch-6-8-23-does-not-return-results-when-i-query-in-a-specific-field/302704/2 "2022-04-19T11:21:30Z")

</div>

> [@joanjanku2000](#):
>
> `bar`

Can you send its mapping too?

---

<div class="post-metadata">

**Author:** ![joanjanku2000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joanjanku2000/32/104542_2.png) [@joanjanku2000](https://discuss.elastic.co/u/joanjanku2000)\
**Post date:** [April 19, 2022, 1:06pm UTC](https://discuss.elastic.co/t/elasticsearch-6-8-23-does-not-return-results-when-i-query-in-a-specific-field/302704/3 "2022-04-19T13:06:42Z")

</div>

The ones I have provided are only "test values" and not the real ones. Thank you for the reply 🙂

---

<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:** [May 17, 2022, 1:07pm UTC](https://discuss.elastic.co/t/elasticsearch-6-8-23-does-not-return-results-when-i-query-in-a-specific-field/302704/4 "2022-05-17T13:07:05Z")

</div>

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