Skip to content

GetIndexSettings response properties not filled correctly #2136

@EricKeij

Description

@EricKeij

NEST/Elasticsearch.Net version: 2.3.1

Elasticsearch version: 2.3.1

Description of the problem including expected versus actual behavior:
When doing GetIndexSettings() I expect the NumberOfReplicas and NumberOfShards properties to be set. Instead they will always be null.

Steps to reproduce:

  1. Do a GetIndexSettings()

var response = ElasticClient.GetIndexSettings(d => d.Index("myindex"))

  1. Check value of NumberOfReplicas and NumberOfShards which will always be null.

var numberOfReplicas = response.Indices.Single(i => i == "myindex").Value.Settings.NumberOfReplicas;

A workaround is the get the value directly from the dictionary using:

var numberOfReplicas = response.Indices.Single(i => i == "myindex").Value.Settings.Single( x => x.Key == "index.NumberOfReplicas").Value

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