【发布时间】:2018-05-24 02:12:23
【问题描述】:
我在 EllasticSearch 中插入了大量数据(100 万)。现在我想创建一个 REST API 来从 EllasticSearch 获取数据。
我想使用 CURL 命令
(例如:curl -i http://localhost:5000/todo/api/v1.0/tasks/2)
能够获取json字段having _id=2
我找到了以下博客https://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask
这对我如何创建 REST API 有所帮助,但我无法理解如何为 ElasticSearch 扩展它。
【问题讨论】:
-
这个elasticsearch api python 是通过 google.wrap 在你的 rest-service 实现中的调用首次被找到的——你使用 API 并返回找到的结果。 en.wikipedia.org/wiki/Facade_pattern
标签: python rest curl elasticsearch