elasticsearch-dsl에는 Search class가 있다
Search class는 scan() API가 있다
이것은 elasticsearch-py.helpers.scan() API의 wrapper로서,
이것은 elasticsearch search의 scroll API의 wrapper이다
이 scan() API를 사용하려는데, 아래 코드는 에러가 발생했다
우선 Post라는 DocType 클래스를 정의한 후이다
Post.search().scan()
--------------
This feature is experimental and may be subject to change.
위에서 작성하던 DocType.search()이라는 API는, experimental function이라고 한다
그런 이유에서 필자는 원치않는 동작을 체험하였기 때문에
DocType.search() 대신 Search() class를 사용하는 것을 추천한다
2018.04.12.
'Language > python' 카테고리의 다른 글
[python] map object (0) | 2018.04.26 |
---|---|
[python] for문과 yield문, return문 (0) | 2018.04.24 |
[python] logging handler class 소개 (0) | 2018.04.12 |
[python] logging process/order/cycle/how-to-work (0) | 2018.04.11 |
[python] got multiple values for keyword argument 'query' error (0) | 2018.04.11 |
WRITTEN BY
- hojongs
블로그 옮겼습니다 https://hojongs.github.io/