5.X/8. Breaking Changes

v5.0-06. Document API changes

drscg 2017. 10. 23. 21:15

?refresh no longer supports truthy and falsy valuesedit

The ?refresh request parameter used to accept any value other than false0off, and no to mean "make the changes from this request visible for search immediately." Now it only accepts ?refresh and ?refresh=true to mean that. You can set it to ?refresh=false and the request will take no refresh-related action. The same is true if you leave refresh off of the url entirely. If you add ?refresh=wait_for Elasticsearch will wait for the changes to become visible before replying to the request but won’t take any immediate refresh related action. See ?refresh.

?refresh request parameter는, "이 request의 변경 사항을 즉시 검색할 수 있도록 표시하게 만들기" 위해, false0offno 가 아닌 다른 값을 받아들이는데 사용되었다. 이제는 그것을 위해 ?refresh 와 ?refresh=true 만을 받아들인다. ?refresh=false 로 설정할 수 있으며, 그 request는 refresh 관련 작업을 수행하지 않는다. 전체 URL에 refresh 가 없어도 마찬가지이다. ?refresh=wait_for 를 추가하면 Elasticsearch는 request에 응답하기 전에 변경 사항을 볼 수 있게 될 때까지 대기하지만 즉각적으로 refresh 관련 작업을 수행하지 않는다. ?refresh를 참조하자.

created field deprecated in the Index APIedit

The created field has been deprecated in the Index API. It now returns result, returning "result": "created" when it created a document and "result": "updated" when it updated the document. This is also true for index bulk operations.

created field는 Index API에서 deprecate되었다. 이제 result 를 return한다. document를 생성할 경우 "result": "created" 를, document를 update할 경우 "result": "updated" 를 반환합니다. index bulk 연산에서도 마찬가지이다.

found field deprecated in the Delete APIedit

The found field has been deprecated in the Delete API. It now returns result, returning "result": "deleted" when it deleted a document and "result": "not_found" when it didn’t find the document. This is also true for delete bulk operations.

found field는 Delete API에서 deprecate되었다. 이제 result 를 return한다. document를 삭제했을 경우 "result": "deleted" 를, document를 찾지 못한 경우 "result": "not_found" 를 return한다. 반환합니다. delete bulk 연산에서도 마찬가지이다.

Reindex and Update By Queryedit

Before 5.0.0 _reindex and _update_by_query only retried bulk failures so they used the following response format:

5.0.0 이전에 _reindex 와 _update_by_query 는 bulk 실패만 재 시도했는데, bulk 재시도의 수를 retries에 표시하는, 다음 response 형식을 사용했다.

{
   ...
   "retries": 10
   ...
}

Where retries counts the number of bulk retries. Now they retry on search failures as well and use this response format:

이제 search 실패를 다시 시도하고, bulk 재시도의 수는 bulk 에, search 재시도의 수는 search 에 표시하는, 다음 response 형식을 사용한다.

{
   ...
   "retries": {
     "bulk": 10,
     "search": 1
   }
   ...
}

Where bulk counts the number of bulk retries and search counts the number of search retries.

get APIedit

As of 5.0.0 the get API will issue a refresh if the requested document has been changed since the last refresh but the change hasn’t been refreshed yet. This will also make all other changes visible immediately. This can have an impact on performance if the same document is updated very frequently using a read modify update pattern since it might create many small segments. This behavior can be disabled by passing realtime=false to the get request.

5.0.0 부터, request된 document가 마지막 refresh 이후 변경되었지만 변경 사항이 아직 refresh되지 않은 경우 get API는 refresh을 실행합니다. 그러면 다른 모든 변경 사항이 즉시 표시됩니다. 동일한 document가 많은 수의 작은 segment를 생성 할 수 있기 때문에, update pattern을 변경하여 읽기를 사용하여 매우 자주 업데이트되면 성능에 영향을 미칠 수 있습니다. 이 동작은 get request에 realtime=false 를 전달하여 비활성화할 수 있다.

The fields field has been renamed to stored_fields

fields field는 stored_fields 로 이름이 변경되었다.

mget APIedit

The fields field has been renamed to stored_fields

fields field는 stored_fields 로 이름이 변경되었다.

update APIedit

The fields field has been deprecated. You should use _source to load the field from _source.

fields field는 deprecate되었다. _source 로부터 field를 load하기 위하여 _source 를 사용해야 한다.

bulk APIedit

The fields field has been deprecated. You should use _source to load the field from _source.

fields field는 deprecate되었다. _source 로부터 field를 load하기 위하여 _source 를 사용해야 한다.


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

v5.0-04. Suggester changes  (0) 2017.10.23
v5.0-05. Index APIs changes  (0) 2017.10.23
v5.0-07. Settings changes  (0) 2017.10.22
v5.0-08. Allocation changes  (0) 2017.10.22
v5.0-09. HTTP changes  (0) 2017.10.22