【文件属性】:
文件名称:akka-http-elasticsearch:akka-http-elasticsearch
文件大小:19KB
文件格式:ZIP
更新时间:2021-04-30 12:03:58
HTML
带有Elasticsearch流的Akka HTTP
如何将数据从elasticsearch流传输到websocket,反之亦然。
要求
在localhost:9300上运行elasticsearch
。 可选,但在以下说明中使用。
跑步
sbt run
特征
服务器具有三个端点来演示不同的用例
/ es /插入
将数据插入elasticsearch中。 首先使用
wscat -c ws://localhost:9000/es/insert
现在,您可以在以下方案id:title:body插入数据。 例如
> 1;My title;My body
< Inserted Question(1,My title,My body)
/ es /获取
该端点将进行搜索查询,并将所有问题流回websocket客户端。 与连接
wscat -c ws://localhost:9000/es/ge
【文件预览】:
akka-http-elasticsearch-master
----.gitignore(211B)
----README.md(2KB)
----activator.properties(395B)
----build.sbt(1KB)
----LICENSE(1KB)
----src()
--------test()
--------main()
----tutorial()
--------index.html(20KB)
----project()
--------plugins.sbt(178B)
--------build.properties(19B)