elasticsearch-net icon indicating copy to clipboard operation
elasticsearch-net copied to clipboard

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

Open alxbauer opened this issue 9 months ago • 0 comments

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);

alxbauer avatar Sep 13 '23 21:09 alxbauer