elasticsearch join连接查询 支持任意版本 多种sql

版权声明:本文为abcd1101博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/abcd1101/article/details/82971708

6.X之后自带的sql工具暂时感觉支持的不多,所以用了一个开源的轮子。

https://github.com/NLPchina/elasticsearch-sql/

安装很方便,跟着他的教程就可以了。至于他的用户界面,我就是用kibana自带的node跑起的。

ln -s /kibana/node/bin/node /usr/bin/

ln -s /kibana/node/bin/npm /usr/bin/

ln -s /kibana/node/bin/npx /usr/bin/

cd site-server
npm install express --save
node node-server.js

ps:

1.error: too many results for first table, stoping at:100000

https://github.com/NLPchina/elasticsearch-sql/issues/302

不过他的join对于大数据还是满足不了,因为他的代码里hardcode了join的first table不能超过十万行。不过他也只限制了first table不超过十万,如果你有一个表超过十万,一个不超过,你可以first table,second table互换来做,当然时间会很长。

https://github.com/NLPchina/elasticsearch-sql/blob/elastic6.3.2/src/main/java/org/elasticsearch/plugin/nlpcn/ElasticJoinExecutor.java

MAX_RESULTS_ON_ONE_FETCH

福利推荐:加班,祛痘,去油,祛湿必备。我现在也在喝,卖家是个同行小姐姐,有需要就加她了解一下吧。

猜你喜欢

转载自blog.csdn.net/abcd1101/article/details/82971708