Skip to content

Parse error on index rollover - max_primary_shard_size doesn't support values of type: VALUE_NUMBER #7933

Closed
@alxbauer

Description

@alxbauer

Elastic.Clients.Elasticsearch version:
8.9.2

Elasticsearch version:
8.9.2

.NET runtime version:
.NET 7

Operating system version:
Windows 10

Description of the problem including expected versus actual behavior:

Parse error on index rollover, when using size conditions:

Elastic.Transport.TransportException : Request failed to execute. Call: Status code 400 from: POST /test-alias/_rollover?pretty=true&error_trace=true. ServerError: Type: x_content_parse_exception Reason: "[1:41] [rollover] failed to parse field [conditions]" CausedBy: "Type: x_content_parse_exception Reason: "[1:41] [rollover_conditions] max_primary_shard_size doesn't support values of type: VALUE_NUMBER""

Steps to reproduce:

Sample code:

    var indexName = "test-index-000001";
    var aliasName = "test-alias";

    var client = GetClient();

    var request = new RolloverRequest(aliasName)
    {
        Conditions = new RolloverConditions
        {
            MaxPrimaryShardSize = new ByteSize("50GB"),
        },
    };

    var response = client.Indices.Rollover(request);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions