5.X/8. Breaking Changes

v5.0-10. REST API changes

drscg 2017. 10. 22. 20:28

Strict REST query string parameter parsingedit

Previous versions of Elasticsearch ignored unrecognized URL query string parameters. This means that extraneous parameters or parameters containing typographical errors would be silently accepted by Elasticsearch. This is dangerous from an end-user perspective because it means a submitted request will silently execute not as intended. This leniency has been removed and Elasticsearch will now fail any request that contains unrecognized query string parameters.

이전 버전의 Elasticsearch는 인식할 수없는 URL query string parameter를 무시했다. 즉, 관련없는 parameter나 오타가 있는 parameter는 Elasticsearch에 의해 에러 없이 허용된다. 이는 제출된 request이 의도한 대로 실행되지 않기 때문에 최종 사용자의 관점에서 위험하다. 이것은 제거되었고, 이제 인식할 수없는 query string parameter를 포함하는 request을 실패한다

id values longer than 512 bytes are rejectededit

When specifying an _id value longer than 512 bytes, the request will be rejected.

512 byte 보다 긴 _id 값을 지정하면 request가 거부된다.

/_optimize endpoint removededit

The deprecated /_optimize endpoint has been removed. The /_forcemerge endpoint should be used in lieu of optimize.

deprecate된 /_optimize endpoint는 제거되었다. /_forcemerge endpoint는 optimize 대신 사용되어야 한다.

The GET HTTP verb for /_forcemerge is no longer supported, please use the POST HTTP verb.

/_forcemerge 을 위한 GET HTTP verb은 더 이상 지원되지 않으니, POST HTTP verb을 사용하자.

Index creation endpoint only accepts PUTedit

It used to be possible to create an index by either calling PUT index_name or POST index_name. Only the former is now supported.

PUT index_name 또는 POST index_name 을 호출하여 index를 생성할 수 있었다. 이제는 PUT 만 지원한다.

HEAD {index}/{type} replaced with HEAD {index}/_mapping/{type}edit

The endpoint for checking whether a type exists has been changed from {index}/{type} to {index}/_mapping/{type} in order to prepare for the removal of types when HEAD {index}/{id} will be used to check whether a document exists in an index. The old endpoint will keep working until 6.0.

HEAD {index}/{id} 가 index에서 document의 존재 여부를 확인하는데 사용될 경우 type의 제거를 준비하기 위하여, type의 존재 여부를 확인하는 endpoint는 {index}/{type} 에서 {index}/_mapping/{type}으로 변경되었다. 기존의 endpoint는 6.0까지 작동한다.

Removed mem section from /_cluster/stats responseedit

The mem section contained only the total value, which was actually the memory available throughout all nodes in the cluster. The section contains now totalfreeusedused_percent and free_percent.

mem section은 total 값만을 포함하고 있었다. 실제로는 cluster의 모든 node에서 사용 가능한 memory였다. 이제 section에는 totalfreeusedused_percentfree_percent 가 있다.

Revised node roles aggregate returned by /_cluster/statsedit

The clientmaster_onlydata_only and master_data fields have been removed in favor of masterdataingest and coordinating_only. A node can contribute to multiple counts as it can have multiple roles. Every node is implicitly a coordinating node, so whenever a node has no explicit roles, it will be counted as coordinating only.

clientmaster_onlydata_onlymaster_data field는 masterdataingestcoordinating_only 를 위해 제거되었다. node는 여러 역할을 가질 수 있으므로 여러 번 count될 수 있다. 모든 node는 암묵적으로 coordinating node이므로 명시적인 역할이 없는 노드는 coordinating으로 간주된다.

Removed shard version information from /_cluster/state routing tableedit

We now store allocation id’s of shards in the cluster state and use that to select primary shards instead of the version information.

이제 shard의 allocation id를 cluster state로 저장하고 이를 사용하여 version 정보 대신 primary shard를 선택한다.

Node roles are not part of node attributes anymoreedit

Node roles are now returned in a specific section, called roles, as part of nodes stats and nodes info response. The new section is an array that holds all the different roles that each node fulfills. In case the array is returned empty, that means that the node is a coordinating only node.

node의 role은 nodes stat 및 nodes info response의 일부로 roles 라는 특정 section으로 반환된다. 새로운 section은 각 node가 수행하는 모든 각각의 역할을 가지고 있는 array이다. array가 비어있는 경우 node는 coordinating node일 뿐이다.

Forbid unquoted JSONedit

Previously, JSON documents were allowed with unquoted field names, which isn’t strictly JSON and broke some Elasticsearch clients. If documents were already indexed with unquoted fields in a previous version of Elasticsearch, some operations may throw errors. To accompany this, a commented out JVM option has been added to the jvm.options file: -Delasticsearch.json.allow_unquoted_field_names.

이전에는, JSON document에서 인용 부호가 없는 field name을 사용할 수 있었다. 이는 엄격히 말해 JSON이 아니며 일부 Elasticsearch client에서 오류가 발생한다. 이전 버전의 Elasticsearch에서 인용 부호가 없는 field로 document가 이미 index된 경우, 일부 연산에서 오류가 발생할 수 있다. 이를 위해, 주석처리 된 JVM option이 -Delasticsearch.json.allow_unquoted_field_names 이 jvm.options 파일에 추가되었다.

Note that this option is provided solely for migration purposes and will be removed in Elasticsearch 6.0.0.

이 option은 마이그레이션 용도로만 제공되며 Elasticsearch 6.0.0에서 제거된다는 것을 기억하자.

Analyze API changesedit

The filters and char_filters parameters have been renamed filter and . The token_filtersparameter has been removed. Use filter instead.

filters 와 char_filters parameter는 filter 와 char_filter`로 이름이 변경되었다. `token_filtersparameter는 제거되었다. 대신 filter 를 사용하자.

DELETE /_query endpoint removededit

The DELETE /_query endpoint provided by the Delete-By-Query plugin has been removed and replaced by the Delete By Query API.

Delete-By-Query plugin에 의해 제공되는 DELETE /_query endpoint가 제거되었고, Delete By Query API로 대체되었다.

Create stored script endpoint removededit

The PUT /_scripts/{lang}/{id}/_create endpoint that previously allowed to create indexed scripts has been removed. Indexed scripts have been replaced by stored scripts.

이전에 indexed script를 생성 할 수 있었던 PUT /_scripts/{lang}/{id}/_create endpoint는 제거되었다. indexed script는 stored scripts로 대체되었다.

Create stored template endpoint removededit

The PUT /_search/template/{id}/_create endpoint that previously allowed to create indexed template has been removed. Indexed templates have been replaced by Pre-registered templates.

이전에 indexed template을 작성할 수 있었던 PUT /_search/template/{id}/_create endpoint는 제거되었다. indexed template은 Pre-registered templates으로 대체되었다.

Remove properties supportedit

Some REST endpoints (e.g., cluster update index settings) supported detecting content in the Java properties format (line-delimited key=value pairs). This support has been removed.

일부 REST endpoint(예: cluster update index 설정)는 Java property 형식(라인으로 구분된 key=value 쌍)으로 content를 감지하는 것을 지원했습니다. 이 지원은 제거되었다.

wait_for_relocating_shards is now wait_for_no_relocating_shards in /_cluster/healthedit

The wait_for_relocating_shards parameter that used to take a number is now simply a boolean flag wait_for_no_relocating_shards, which if set to true, means the request will wait (up until the configured timeout) for the cluster to have no shard relocations before returning. Defaults to false, which means the operation will not wait.

number를 가지고 사용되었던 wait_for_relocating_shards parameter는 이제 단순히 boolean flagwait_for_no_relocating_shards 이다. 이 parameter가 true로 설정되면 반환되기 전에 cluster가 shard relocation를 갖지 않도록 request가 대기한다(설정된 timeout 시간까지). 기본값은 false이다. 즉, 연산은 대기하지 않는다.


'5.X > 8. Breaking Changes' 카테고리의 다른 글

v5.0-08. Allocation changes  (0) 2017.10.22
v5.0-09. HTTP changes  (0) 2017.10.22
v5.0-11. CAT API changes  (0) 2017.10.22
v5.0-12. Java API changes  (0) 2017.10.22
v5.0-13. Packaging  (0) 2017.10.22