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

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.

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 :

{
  "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?

mappings should be a top-level key in the body instead of a child of 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.

{
  "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"
              }
            }
          }
        }
      }
    }
  }
}

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