Skip to content

Indices.GetAsync() is not deserializing custom analyzers properly #5432

@karoberts

Description

@karoberts

NEST: 7.11.1:

Elastic: 7.11.2:

I have an index with a filter and 2 analyzers under settings.index.analysis. Using NEST var info = await client.Indices.GetAsync("index") I expect to be able to see them under info.Indices["index"].Settings.Analysis, but everything under the analyzers is null in there.

I confirmed via fiddler that the data comes back in the json response from elasticsearch. For now I'm using the low level client with a hand built request, but I'd much rather use the NEST version.

Steps to reproduce:

  1. Create an index with a filter and/or analyzer in the index settings
  2. Call GetAsync on that index
  3. Inspect response to see if the settings are there

Expected behavior
I expect that the GetIndexResponse would have the index settings fully populated

    "settings": {
        "index": {
            "analysis": {
                "filter": {
                    "autocomplete_ngram": {
                        "type": "edge_ngram",
                        "min_gram": 3,
                        "max_gram": 20
                    }
                },
                "analyzer": {
                    "index_autocomplete": {
                        "tokenizer": "keyword",
                        "filter": [
                            "lowercase",
                            "autocomplete_ngram"
                        ]
                    },
                    "search_autocomplete": {
                        "tokenizer": "keyword",
                        "filter": [
                            "lowercase"
                        ]
                    }
                }
            }
        }

you can see here how the analyzers are null in the response
image

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