Graylog2 / Graylog2/graylog2-server

Parameter "field_type_refresh_interval" is defined as optional but it is mandatory

Open
#5,798 1 comment 0 reactions 0 assignees View on GitHub
bug elasticsearch triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

The parameter "field_type_refresh_interval" of Create Index Set API is required, but I in the documentation it is defined as optional. When creating index set using UI, 5 seconds is used as a default, that should be the case with the api too.

## Expected Behavior
Index set should be created, because request is in compliance with the documentation.

## Current Behavior
```
{
"type": "ApiError",
"message": "Can not construct instance of org.graylog2.rest.resources.system.indexer.responses.IndexSetSummary, problem: Null fieldTypeRefreshInterval\n at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@748f2fd3; line: 23, column: 9]"
}
```

## Possible Solution
Use 5 seconds as a default if the parameter is not provided in the request.

## Steps to Reproduce (for bugs)
Try to create an index set using api-browser with the following payload

```
{
"default": false,
"description": "asdf",
"index_analyzer": "standard",
"index_optimization_disabled": false,
"index_optimization_max_num_segments": 1,
"index_prefix": "asdf",
"replicas": 1,
"creation_date": "2019-03-22T17:01:35.140Z",
"retention_strategy": {
"max_number_of_indices": 14,
"type": "org.graylog2.indexer.retention.strategies.DeletionRetentionStrategyConfig"
},
"retention_strategy_class": "org.graylog2.indexer.retention.strategies.DeletionRetentionStrategy",
"rotation_strategy": {
"rotation_period": "P1D",
"type": "org.graylog2.indexer.rotation.strategies.TimeBasedRotationStrategyConfig"
},
"rotation_strategy_class": "org.graylog2.indexer.rotation.strategies.TimeBasedRotationStrategy",
"shards": 4,
"title": "asdf",
"writable": true
}
```

## Context

## Your Environment

* Graylog Version: 3.0.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.