# Search NOT working for json ingestion

**URL:** <https://discuss.elastic.co/t/search-not-working-for-json-ingestion/232537>\
**Category:** Elasticsearch\
**Created:** [May 14, 2020, 3:09am UTC](https://discuss.elastic.co/t/search-not-working-for-json-ingestion/232537 "2020-05-14T03:09:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![richylyq](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@richylyq](https://discuss.elastic.co/u/richylyq)\
**Post date:** [May 14, 2020, 3:09am UTC](https://discuss.elastic.co/t/search-not-working-for-json-ingestion/232537/1 "2020-05-14T03:09:48Z")

</div>

Hi all,

I have just written a script for json ingestion into elasticsearch and i have indexed my json document, but when i tried to search for certain terms, it returns this error msg which I do not know how to resolve. I am not quite sure what is the error on `field expansion matches too many fields, limit: 1024, got: 3310`

Looking forward to any sort of advice

```auto
{
  "error" : {
    "root_cause" : [
      {
        "type" : "query_shard_exception",
        "reason" : "failed to create query: {\n \"query_string\" : {\n \"query\" : \"Management\",\n \"fields\" : [],\n \"type\" : \"best_fields\",\n \"default_operator\" : \"or\",\n \"max_determinized_states\" : 10000,\n \"enable_position_increments\" : true,\n \"fuzziness\" : \"AUTO\",\n \"fuzzy_prefix_length\" : 0,\n \"fuzzy_max_expansions\" : 50,\n \"phrase_slop\" : 0,\n \"analyze_wildcard\" : false,\n \"escape\" : false,\n \"auto_generate_synonyms_phrase_query\" : true,\n \"fuzzy_transpositions\" : true,\n \"boost\" : 1.0\n }\n}",
        "index_uuid" : "uC4adilAQsa4Npd8Wng0fg",
        "index" : "a-index"
      }
    ],
    "type" : "search_phase_execution_exception",
    "reason" : "all shards failed",
    "phase" : "query",
    "grouped" : true,
    "failed_shards" : [
      {
        "shard" : 0,
        "index" : "a-index",
        "node" : "Zhb441p7SUCJ6b6vVE8yag",
        "reason" : {
          "type" : "query_shard_exception",
          "reason" : "failed to create query: {\n \"query_string\" : {\n \"query\" : \"Management\",\n \"fields\" : [],\n \"type\" : \"best_fields\",\n \"default_operator\" : \"or\",\n \"max_determinized_states\" : 10000,\n \"enable_position_increments\" : true,\n \"fuzziness\" : \"AUTO\",\n \"fuzzy_prefix_length\" : 0,\n \"fuzzy_max_expansions\" : 50,\n \"phrase_slop\" : 0,\n \"analyze_wildcard\" : false,\n \"escape\" : false,\n \"auto_generate_synonyms_phrase_query\" : true,\n \"fuzzy_transpositions\" : true,\n \"boost\" : 1.0\n }\n}",
          "index_uuid" : "uC4adilAQsa4Npd8Wng0fg",
          "index" : "a-index",
          "caused_by" : {
            "type" : "illegal_argument_exception",
            "reason" : "field expansion matches too many fields, limit: 1024, got: 3310"
          }
        }
      }
    ]
  },
  "status" : 400
}

```

Is this error due to the fact that i have 3310 lines of text-data that elastic has to go through every single one of them in order to be able to do the search for the particular term, and it is preventing the search from happening as it will take up too much resources? Based on what i read from this post `https://discuss.elastic.co/t/error-since-7-4-upgrade-field-expansion-matches-too-many-fields/204087`

---

<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:** [June 11, 2020, 3:09am UTC](https://discuss.elastic.co/t/search-not-working-for-json-ingestion/232537/2 "2020-06-11T03:09:49Z")

</div>

Closed on June 11, 2020, 3:09am UTC

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