# "Only value lists are allowed in serialized settings" error when creating new analyzer

**URL:** <https://discuss.elastic.co/t/only-value-lists-are-allowed-in-serialized-settings-error-when-creating-new-analyzer/228109>\
**Category:** Elasticsearch\
**Created:** [April 15, 2020, 11:53am UTC](https://discuss.elastic.co/t/only-value-lists-are-allowed-in-serialized-settings-error-when-creating-new-analyzer/228109 "2020-04-15T11:53:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aziz\_Holden](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aziz_holden/32/45836_2.png) [@Aziz\_Holden](https://discuss.elastic.co/u/Aziz_Holden)\
**Post date:** [April 15, 2020, 11:53am UTC](https://discuss.elastic.co/t/only-value-lists-are-allowed-in-serialized-settings-error-when-creating-new-analyzer/228109/1 "2020-04-15T11:53:33Z")

</div>

I'm trying to create a custom analyzer that does the following: if a token length is greater than 14, include the token itself as well as the truncated token:

```auto
   PUT localhost:9200/assets/
    {
      "settings": {
        "analysis": {
          "analyzer": {
            "tokens_greater_14_analyzer": {
              "tokenizer": "standard",
              "filter": ["greater_than_14_chars"]
            }
          },
          "filter": {
            "greater_than_14_chars": {
              "type": "condition",
              "filter": ["trunc_and_original"],
              "script": {
                  "source": "token.getTerm().length() > 14"
              }
            },
            "trunc_and_original": {
                "type": "multiplexer",
                "filters": ["lowercase", ["lowercase, trunc_14_chars"]]
            },
            "trunc_14_chars": {
                "type": "truncate",
                "length": 14
            }
          }
        }
      }
    }

```

But when making that API call, I get the following error:

```auto
    {
        "error": {
            "root_cause": [
                {
                    "type": "settings_exception",
                    "reason": "Failed to load settings from [{\"analysis\":{\"filter\":{\"trunc_14_chars\":{\"length\":14,\"type\":\"truncate\"},\"greater_than_14_chars\":{\"filter\":[\"trunc_and_original\"],\"type\":\"condition\",\"script\":{\"source\":\"token.getTerm().length() > 14\"}},\"trunc_and_original\":{\"filters\":[\"lowercase\",[\"lowercase, trunc_14_chars\"]],\"type\":\"multiplexer\"}},\"analyzer\":{\"tokens_greater_14_analyzer\":{\"filter\":[\"greater_than_14_chars\"],\"tokenizer\":\"standard\"}}}}]"
                }
            ],
            "type": "settings_exception",
            "reason": "Failed to load settings from [{\"analysis\":{\"filter\":{\"trunc_14_chars\":{\"length\":14,\"type\":\"truncate\"},\"greater_than_14_chars\":{\"filter\":[\"trunc_and_original\"],\"type\":\"condition\",\"script\":{\"source\":\"token.getTerm().length() > 14\"}},\"trunc_and_original\":{\"filters\":[\"lowercase\",[\"lowercase, trunc_14_chars\"]],\"type\":\"multiplexer\"}},\"analyzer\":{\"tokens_greater_14_analyzer\":{\"filter\":[\"greater_than_14_chars\"],\"tokenizer\":\"standard\"}}}}]",
            "caused_by": {
                "type": "illegal_state_exception",
                "reason": "only value lists are allowed in serialized settings"
            }
        },
        "status": 500
    }

```

Any help would be appreciated. Thanks!

---

<div class="post-metadata">

**Author:** ![Aziz\_Holden](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aziz_holden/32/45836_2.png) [@Aziz\_Holden](https://discuss.elastic.co/u/Aziz_Holden)\
**Post date:** [April 15, 2020, 4:19pm UTC](https://discuss.elastic.co/t/only-value-lists-are-allowed-in-serialized-settings-error-when-creating-new-analyzer/228109/2 "2020-04-15T16:19:03Z")

</div>

Figured it out. It was my multiplexer. It's `"filters": ["lowercase", "lowercase, trunc_14_chars"]`, not `"filters": ["lowercase", ["lowercase, trunc_14_chars"]]`

---

<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:** [May 13, 2020, 4:19pm UTC](https://discuss.elastic.co/t/only-value-lists-are-allowed-in-serialized-settings-error-when-creating-new-analyzer/228109/3 "2020-05-13T16:19:08Z")

</div>

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