1 Star 7 Fork 30

ssssssss-team / spider-flow-elasticsearch

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

spider-flow-elasticsearch

介绍

spider-flow Elasticsearch插件

使用方法

导入db文件夹sp_elasticsearch.sql文件到数据库
在 spider-flow-web/pom.xml引用

<dependency>
 	<groupId>org.spiderflow</groupId>
 	<artifactId>spider-flow-elasticsearch</artifactId>
</dependency>

在 spider-flow/pom.xml引用

<dependency>
    <groupId>org.spiderflow</groupId>
    <artifactId>spider-flow-elasticsearch</artifactId>
    <version>${spider-flow.version}</version>
</dependency>

在 spider-flow/pom.xml,防止环境引用springboot自动传入的依赖,version版本要与使用的ES版本一致(或者用其他排除自动配置的方法例如在application-*.properties中配置spring.autoconfigure.exclude)

<dependency>
    <groupId>org.elasticsearch</groupId>
    <artifactId>elasticsearch</artifactId>
    <version>6.8.13</version>
</dependency>

注意spider-flow-elasticsearch/pom.xml中依赖的版本与ES版本一致

使用操作

首先先创建Elasticsearch数据源 使用如下方式进行调用

${elasticsearch.aliasName(创建Elasticsearch数据源时填写的别名).insertByListMap('对应es的index名','对应es的type',[{key : value},{key : value}])}

或插入json格式的字符串数组批量插入

${elasticsearch.aliasName(创建Elasticsearch数据源时填写的别名).insertByJSONString('index','type',['{key : value}','{key : value}'])}

更多方法请查看ElasticSearchClientExtension源码

MIT License Copyright (c) 2021 蔡茂昌 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

spider-flow Elasticsearch插件 展开 收起
Java
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/ssssssss-team/spider-flow-elasticsearch.git
git@gitee.com:ssssssss-team/spider-flow-elasticsearch.git
ssssssss-team
spider-flow-elasticsearch
spider-flow-elasticsearch
master

搜索帮助