Skip to content

Deserializing a Common Grams Token Filter that uses a predefined word list fails #2886

@awelburn

Description

@awelburn

NEST/Elasticsearch.Net version: 5.x
Elasticsearch version: 5.x

Description of the problem including expected versus actual behavior:
Following the examples here: https://www.elastic.co/guide/en/elasticsearch/guide/master/common-grams.html (I know this was written against v2, but I haven't found anything to suggest this filter has changed since?)

Steps to reproduce:

  1. Create a new index as per the examples in the url above, using "_english_" as the value for "common_words"
  2. Create a nest client and call a method that retrieves index settings, GetIndexAsync() for example.
  3. Exception thrown!

Provide DebugInformation (if relevant):
Elasticsearch.Net.UnexpectedElasticsearchClientException: Error converting value "english" to type 'System.Collections.Generic.IEnumerable1[System.String]'. Path 'common_words'. ---> Newtonsoft.Json.JsonSerializationException: Error converting value "_english_" to type 'System.Collections.Generic.IEnumerable1[System.String]'. Path 'common_words'. ---> System.ArgumentException: Could not cast or convert from System.String to System.Collections.Generic.IEnumerable`1[System.String].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions