# Working elasticsearch 5 query don't work in 6.2 (reason : all shards failed)

**URL:** <https://discuss.elastic.co/t/working-elasticsearch-5-query-dont-work-in-6-2-reason-all-shards-failed/124799>\
**Category:** Elasticsearch\
**Created:** [March 20, 2018, 2:51pm UTC](https://discuss.elastic.co/t/working-elasticsearch-5-query-dont-work-in-6-2-reason-all-shards-failed/124799 "2018-03-20T14:51:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Webmaster\_Cerf](https://avatars.discourse-cdn.com/v4/letter/w/50afbb/32.png) [@Webmaster\_Cerf](https://discuss.elastic.co/u/Webmaster_Cerf)\
**Post date:** [March 20, 2018, 2:51pm UTC](https://discuss.elastic.co/t/working-elasticsearch-5-query-dont-work-in-6-2-reason-all-shards-failed/124799/1 "2018-03-20T14:51:32Z")

</div>

Hello after an upgrade to 6.2 my ajax requests to elasticsearch fails with this message :  
An uncaught Exception was encountered  
Type: Elastica\Exception\ResponseException

```
    "bool" : {
"must" : [
  {
    "query_string" : {
      "query" : "*18S",
      "fields" : [
        "n_stage^1.0"
      ],
      "type" : "best_fields",
      "default_operator" : "or",
      "max_determinized_states" : 10000,
      "enable_position_increments" : true,
      "fuzziness" : "AUTO",
      "fuzzy_prefix_length" : 0,
      "fuzzy_max_expansions" : 50,
      "phrase_slop" : 0,
      "escape" : false,
      "auto_generate_synonyms_phrase_query" : true,
      "fuzzy_transpositions" : true,
      "boost" : 1.0
    }
  }
],
"should" : [
  {
    "query_string" : {
      "query" : "par~3",
      "fields" : [
        "contenu^1.0",
        "intitule_stage^3.0",
        "mmp^1.0",
        "mots_cles^3.0",
        "objectifs^1.0",
        "sessions.ville^5.0"
      ],
      "type" : "best_fields",
      "default_operator" : "or",
      "max_determinized_states" : 10000,
      "enable_position_increments" : true,
      "fuzziness" : "AUTO",
      "fuzzy_prefix_length" : 0,
      "fuzzy_max_expansions" : 50,
      "phrase_slop" : 0,
      "escape" : false,
      "auto_generate_synonyms_phrase_query" : true,
      "fuzzy_transpositions" : true,
      "boost" : 1.0
    }
  }
],
"adjust_pure_negative" : true,
"boost" : 1.0

```

}  
} [index: cerf] [reason: all shards failed]

have you an idea where is the problem ? The message suggest my server could be down but it works.

Thanks for your help

---

<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:** [April 17, 2018, 2:51pm UTC](https://discuss.elastic.co/t/working-elasticsearch-5-query-dont-work-in-6-2-reason-all-shards-failed/124799/2 "2018-04-17T14:51:49Z")

</div>

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