# Encountering "only value lists are allowed in serialized settings" while creating a new index

**URL:** <https://discuss.elastic.co/t/encountering-only-value-lists-are-allowed-in-serialized-settings-while-creating-a-new-index/204467>\
**Category:** Elasticsearch\
**Created:** [October 21, 2019, 12:33pm UTC](https://discuss.elastic.co/t/encountering-only-value-lists-are-allowed-in-serialized-settings-while-creating-a-new-index/204467 "2019-10-21T12:33:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Avhirup\_Chakraborty](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/avhirup_chakraborty/32/56250_2.png) [@Avhirup\_Chakraborty](https://discuss.elastic.co/u/Avhirup_Chakraborty)\
**Post date:** [October 21, 2019, 12:33pm UTC](https://discuss.elastic.co/t/encountering-only-value-lists-are-allowed-in-serialized-settings-while-creating-a-new-index/204467/1 "2019-10-21T12:33:18Z")

</div>

Hello all,

I am trying to create an index and trying to define mappings for index.  
My Elasticsearch version is 7.3.2.  
Below is the code snippet I am trying.

```json
PUT dish
{
  "settings": {
    "index": {
      "number_of_shards": 1,
      "number_of_replicas": 1
    },
    "analysis": {
      "analyzer": {
        "lowercase_keyword_analyzer": {
          "tokenizer": "keyword",
          "filter": [
            "lowercase"
          ]
        },
        "suggestion_analyzer": {
          "tokenizer": "standard",
          "filter": [
            "lowercase"
          ]
        }
      },
      "normalizer": {
        "lowercase_normalizer": {
          "type": "custom",
          "char_filter": [],
          "filter": [
            "lowercase"
          ]
        }
      }
    },
    "mappings": {
      "dynamic_templates": [
        {
          "search_result_data": {
            "mapping": {
              "type": "keyword",
              "index": "false"
            },
            "path_match": "search_result_data.*"
          }
        },
        {
          "scores": {
            "mapping": {
              "type": "double"
            },
            "path_match": "scores.*"
          }
        },
        {
          "category_scores": {
            "mapping": {
              "type": "integer"
            },
            "path_match": "category_scores.*"
          }
        },
        {
          "category": {
            "mapping": {
              "type": "keyword",
              "index": "not_analyzed"
            },
            "path_match": "category.*"
          }
        },
        {
          "string_sort": {
            "mapping": {
              "analyzer": "lowercase_keyword_analyzer",
              "type": "keyword"
            },
            "path_match": "string_sort.*"
          }
        },
        {
          "number_sort": {
            "mapping": {
              "index": "not_analyzed",
              "type": "double"
            },
            "path_match": "number_sort.*"
          }
        }
      ],
      "properties": {
        "search_data": {
          "type": "nested",
          "properties": {
            "full_text": {
              "type": "keyword",
              "index_analyzer": "standard",
              "search_analyzer": "standard",
              "fields": {
                "no-decompound": {
                  "type": "keyword",
                  "index_analyzer": "standard",
                  "search_analyzer": "standard"
                },
                "no-stem": {
                  "type": "keyword",
                  "index_analyzer": "standard",
                  "search_analyzer": "standard"
                }
              }
            },
            "full_text_boosted": {
              "type": "keyword",
              "index_analyzer": "standard",
              "search_analyzer": "standard",
              "fields": {
                "edge": {
                  "type": "keyword",
                  "index_analyzer": "standard",
                  "search_analyzer": "standard"
                },
                "no-decompound": {
                  "type": "keyword",
                  "index_analyzer": "standard",
                  "search_analyzer": "standard"
                },
                "no-stem": {
                  "type": "keyword",
                  "index_analyzer": "standard",
                  "search_analyzer": "standard"
                }
              }
            },
            "string_facet": {
              "type": "nested",
              "properties": {
                "facet-name": {
                  "type": "keyword",
                  "index": "not_analyzed"
                },
                "facet-value": {
                  "type": "keyword",
                  "index": "not_analyzed"
                }
              }
            },
            "number_facet": {
              "type": "nested",
              "properties": {
                "facet-name": {
                  "type": "keyword",
                  "index": "not_analyzed"
                },
                "facet-value": {
                  "type": "double"
                }
              }
            }
          }
        }
      }
    }
  }
}

```

The output I am getting :

```json
{
  "error": {
    "root_cause": [
      {
        "type": "settings_exception",
        "reason": "Failed to load settings from ..."
      }
    ],
    "type": "settings_exception",
    "reason": "Failed to load settings from ...",
    "caused_by": {
      "type": "illegal_state_exception",
      "reason": "only value lists are allowed in serialized settings"
    }
  },
  "status": 500
} 

```

The error only pops up when i try to have properties in my mappings.  
What could be the reason for this?

---

<div class="post-metadata">

**Author:** ![Glen\_Smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/glen_smith/32/111656_2.png) [@Glen\_Smith](https://discuss.elastic.co/u/Glen_Smith)\
**Post date:** [October 21, 2019, 6:20pm UTC](https://discuss.elastic.co/t/encountering-only-value-lists-are-allowed-in-serialized-settings-while-creating-a-new-index/204467/2 "2019-10-21T18:20:31Z")

</div>

`mappings` should be a top-level key in the body instead of a child of `settings`.

---

<div class="post-metadata">

**Author:** ![Avhirup\_Chakraborty](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/avhirup_chakraborty/32/56250_2.png) [@Avhirup\_Chakraborty](https://discuss.elastic.co/u/Avhirup_Chakraborty)\
**Post date:** [October 22, 2019, 3:12am UTC](https://discuss.elastic.co/t/encountering-only-value-lists-are-allowed-in-serialized-settings-while-creating-a-new-index/204467/3 "2019-10-22T03:12:11Z")

</div>

> [@Avhirup\_Chakraborty](#):
>
> only value lists are allowed in serialized settings

Hey Glen,  
Thanks , It worked. I had few more bugs in my code , adding my new code which worked perfectly for future references for someone.

```json
{
  "settings": {
    "index": {
      "number_of_shards": 1,
      "number_of_replicas": 1
    },
    "analysis": {
      "analyzer": {
        "lowercase_keyword_analyzer": {
          "tokenizer": "keyword",
          "filter": [
            "lowercase"
          ]
        },
        "suggestion_analyzer": {
          "tokenizer": "standard",
          "filter": [
            "lowercase"
          ]
        }
      },
      "normalizer": {
        "lowercase_normalizer": {
          "type": "custom",
          "char_filter": [],
          "filter": [
            "lowercase"
          ]
        }
      }
    }
  },
  "mappings": {
    "dynamic_templates": [{
        "search_result_data": {
          "mapping": {
            "type": "keyword",
            "index": "false"
          },
          "path_match": "search_result_data.*"
        }
      },
      {
        "scores": {
          "mapping": {
            "type": "double"
          },
          "path_match": "scores.*"
        }
      },
      {
        "category_scores": {
          "mapping": {
            "type": "integer"
          },
          "path_match": "category_scores.*"
        }
      },
      {
        "category": {
          "mapping": {
            "type": "keyword",
            "index": "false"
          },
          "path_match": "category.*"
        }
      },
      {
        "string_sort": {
          "mapping": {
            "analyzer": "lowercase_keyword_analyzer",
            "type": "keyword"
          },
          "path_match": "string_sort.*"
        }
      },
      {
        "number_sort": {
          "mapping": {
            "index": "false",
            "type": "double"
          },
          "path_match": "number_sort.*"
        }
      }
    ],
    "properties": {
      "search_data": {
        "type": "nested",
        "properties": {
          "full_text": {
            "type": "text",
            "analyzer": "standard",
            "search_analyzer": "standard",
            "fields": {
              "no-decompound": {
                "type": "text",
                "analyzer": "standard",
                "search_analyzer": "standard"
              },
              "no-stem": {
                "type": "text",
                "analyzer": "standard",
                "search_analyzer": "standard"
              }
            }
          },
          "full_text_boosted": {
            "type": "text",
            "analyzer": "standard",
            "search_analyzer": "standard",
            "fields": {
              "edge": {
                "type": "text",
                "analyzer": "standard",
                "search_analyzer": "standard"
              },
              "no-decompound": {
                "type": "text",
                "analyzer": "standard",
                "search_analyzer": "standard"
              },
              "no-stem": {
                "type": "text",
                "analyzer": "standard",
                "search_analyzer": "standard"
              }
            }
          },
          "string_facet": {
            "type": "nested",
            "properties": {
              "facet-name": {
                "type": "keyword",
                "index": "false"
              },
              "facet-value": {
                "type": "keyword",
                "index": "false"
              }
            }
          },
          "number_facet": {
            "type": "nested",
            "properties": {
              "facet-name": {
                "type": "keyword",
                "index": "false"
              },
              "facet-value": {
                "type": "double"
              }
            }
          }
        }
      }
    }
  }
}

```

---

<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:** [November 19, 2019, 3:12am UTC](https://discuss.elastic.co/t/encountering-only-value-lists-are-allowed-in-serialized-settings-while-creating-a-new-index/204467/4 "2019-11-19T03:12:15Z")

</div>

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