Skip to content

Error in parsing index settings #3262

@rwb196884

Description

@rwb196884

the index is called products_purchasing and here is its settings from GET /products_purchasing

{
  "products_purchasing": {
    "aliases": {},
    "mappings": { ...
    },
    "settings": {
      "index": {
        "number_of_shards": "5",
        "provided_name": "products_purchasing",
        "creation_date": "1510930394462",
        "analysis": {
          "normalizer": {
            "lowercase": {
              "filter": "lowercase",
              "type": "custom",
              "char_filter": "words"
            }
          },
          "analyzer": {
            "whitespace_lowercase": {
              "filter": "lowercase",
              "type": "custom",
              "tokenizer": "whitespace"
            },
            "keyword_lowercase": {
              "filter": "lowercase",
              "type": "custom",
              "tokenizer": "keyword"
            }
          },
          "char_filter": {
            "words": {
              "pattern": "[(^([^A-Za-z\s]*\s)*|[^A-Za-z\s])]",
              "type": "pattern_replace",
              "replacement": ""
            }
          }
        },
        "number_of_replicas": "1",
        "uuid": "peH2yqVLTIOc4ScTUYTtEA",
        "version": {
          "created": "5050099"
        }
      }
    }
  }
}

This code

IGetIndexResponse ix = client.GetIndex(new GetIndexRequest(Indices.Index("products_purchasing")));

Produces this exception (line 89 of Transport.cs)

Elasticsearch.Net.UnexpectedElasticsearchClientException
  HResult=0x80131500
  Message=Error converting value "lowercase" to type 'System.Collections.Generic.IEnumerable`1[System.String]'. Path 'filter'.
  Source=Elasticsearch.Net
  StackTrace:
   at Elasticsearch.Net.Transport`1.Request[TReturn](HttpMethod method, String path, PostData`1 data, IRequestParameters requestParameters) in C:\Users\russ\source\elasticsearch-net-5.x\src\Elasticsearch.Net\Transport\Transport.cs:line 89
   at Elasticsearch.Net.ElasticLowLevelClient.DoRequest[T](HttpMethod method, String path, PostData`1 data, IRequestParameters requestParameters) in C:\Users\russ\source\elasticsearch-net-5.x\src\Elasticsearch.Net\ElasticLowLevelClient.cs:line 61
   at Elasticsearch.Net.ElasticLowLevelClient.IndicesGet[T](String index, Func`2 requestParameters) in C:\Users\russ\source\elasticsearch-net-5.x\src\Elasticsearch.Net\ElasticLowLevelClient.Generated.cs:line 3416
   at Nest.LowLevelDispatch.IndicesGetDispatch[T](IRequest`1 p) in C:\Users\russ\source\elasticsearch-net-5.x\src\Nest\_Generated\_LowLevelDispatch.generated.cs:line 1591
   at Nest.ElasticClient.<GetIndex>b__298_0(IGetIndexRequest p, PostData`1 d) in C:\Users\russ\source\elasticsearch-net-5.x\src\Nest\Indices\IndexManagement\GetIndex\ElasticClient-GetIndex.cs:line 38
   at Nest.ElasticClient.Nest.IHighLevelToLowLevelDispatcher.Dispatch[TRequest,TQueryString,TResponse](TRequest request, Func`3 responseGenerator, Func`3 dispatch) in C:\Users\russ\source\elasticsearch-net-5.x\src\Nest\ElasticClient.cs:line 57
   at Nest.ElasticClient.Nest.IHighLevelToLowLevelDispatcher.Dispatch[TRequest,TQueryString,TResponse](TRequest request, Func`3 dispatch) in C:\Users\russ\source\elasticsearch-net-5.x\src\Nest\ElasticClient.cs:line 47
   at Nest.ElasticClient.GetIndex(IGetIndexRequest request) in C:\Users\russ\source\elasticsearch-net-5.x\src\Nest\Indices\IndexManagement\GetIndex\ElasticClient-GetIndex.cs:line 36
   at ConsoleAppElasticIndexer.Program.Main(String[] args) in D:\Work\cloudBuy\ConsoleAppElasticIndexer\Program.cs:line 21

Inner Exception 1:
JsonSerializationException: Error converting value "lowercase" to type 'System.Collections.Generic.IEnumerable`1[System.String]'. Path 'filter'.

Inner Exception 2:
ArgumentException: Could not cast or convert from System.String to System.Collections.Generic.IEnumerable`1[System.String].

Metadata

Metadata

Assignees

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