# "\[query\_shard\_exception\] failed to create query" for second index/website

**URL:** <https://discuss.elastic.co/t/query-shard-exception-failed-to-create-query-for-second-index-website/189721>\
**Category:** Elasticsearch\
**Created:** [July 10, 2019, 10:26am UTC](https://discuss.elastic.co/t/query-shard-exception-failed-to-create-query-for-second-index-website/189721 "2019-07-10T10:26:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshua.creek](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@joshua.creek](https://discuss.elastic.co/u/joshua.creek)\
**Post date:** [July 10, 2019, 10:26am UTC](https://discuss.elastic.co/t/query-shard-exception-failed-to-create-query-for-second-index-website/189721/1 "2019-07-10T10:26:18Z")

</div>

Hello!

I'm in the process of adding elasticsearch to our second website, with a new index. Each site has a specified index in a js config file. The current site works flawlessly, however when trying to run a search on the new index I get the error in the title of this post. The exact same code works fine on the other index. Any suggestions for what might be going wrong?

```
    Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware An unhandled exception has occurred while executing the request.Microsoft.AspNetCore.NodeServices.HostingModels.NodeInvocationException: [query_shard_exception] failed to create query: {
      "nested" : {
        "query" : {
          "match_all" : {
            "boost" : 1.0
          }
        },
        "path" : "attributes",
        "ignore_unmapped" : false,
        "score_mode" : "avg",
        "boost" : 1.0
      }
    }, with { index_uuid="uuidhere" & index="indexnamehere" }
```

---

<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:** [August 7, 2019, 10:26am UTC](https://discuss.elastic.co/t/query-shard-exception-failed-to-create-query-for-second-index-website/189721/2 "2019-08-07T10:26:23Z")

</div>

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