Index level settings are wiped-out from v5.2.2

Following error observed while applying threshold settings.

{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "unknown setting [index.translog.flush_threshold_ops] did you mean [index.translog.flush_threshold_size]?"
}
],
"type": "illegal_argument_exception",
"reason": "unknown setting [index.translog.flush_threshold_ops] did you mean [index.translog.flush_threshold_size]?"
},
"status": 400
}

i want to use index level setting using JAVA API