elasticsearch搜索功能強勁,就是查詢語法復雜,presto提供了非常open的plugin機制,我改進了下原有的presto-elasticsearch connector,現發布於github
功能改進點
- 自動加載elasticsearch schema
- 支持分片數據加載
- predication pushdown,注意由於presto spi接口的原因,目前只支持and類型的過濾器下推,對於OR表達式不支持,不支持like類型的過濾器下推
- 避免重復加載schema
運行辦法
在etc/catalog目錄下添加es.properties即可,內容如下
connector.name=elasticsearch
elasticsearch-server=localhost
elasticsearch-port=9300
elasticsearch-clustername=elasticsearch_demo
時間倉促,錯誤在所難免,歡迎批評指正。
git地址
https://github.com/hseagle/presto
版本: es_pro