当前位置: 首页 > news >正文

青岛公司建设网站建站合同模板

青岛公司建设网站,建站合同模板,手机怎么安装网站程序,小型的电商网站有哪些文章目录 三、RestClient操作索引库与文档3.1 操作索引库3.2 操作文档结束语 三、RestClient操作索引库与文档 ES官方提供了各种不同语言的客户端#xff0c;用来操作ES。这些客户端的本质就是组装DSL语句#xff0c;通过http请求发送给ES。 官方文档地址: https://www.ela… 文章目录 三、RestClient操作索引库与文档3.1 操作索引库3.2 操作文档结束语 三、RestClient操作索引库与文档 ES官方提供了各种不同语言的客户端用来操作ES。这些客户端的本质就是组装DSL语句通过http请求发送给ES。 官方文档地址: https://www.elastic.co/guide/en/elasticsearch/client/index.html 数据库文件视频里展示的数据库表可以使用自己有的其他数据替代不一定非要一致。 自己手敲了个工程项目包含SQL文件测试RestClient项目文件 3.1 操作索引库 设计数据表对应的mappings PUT /movie {mappings: {properties: {all:{type: text,analyzer: ik_max_word},movieId:{type: keyword},movieTitle:{type: text,analyzer: ik_max_word, copy_to: all},movieIntroduction:{type: text,analyzer: ik_max_word, copy_to: all},movieRating:{type: float},movieReleaseDate:{type: keyword, copy_to: all}}} }引入依赖 propertiesjava.version1.8/java.versionelasticsearch.version7.12.1/elasticsearch.versionmybatis-plus-boot.version3.4.2/mybatis-plus-boot.version /propertiesdependencygroupIdorg.elasticsearch.client/groupIdartifactIdelasticsearch-rest-high-level-client/artifactIdversion7.12.1/version /dependency初始化 public class MovieIndexTest {private RestHighLevelClient client;Testvoid testInit(){System.out.println(client);}BeforeEachvoid setUp(){this.client new RestHighLevelClient(RestClient.builder(HttpHost.create(http://10.120.54.174:9200)));}AfterEachvoid close() throws IOException {this.client.close();} }创建movie索引CREATE_MOVIE 为上面的 mappings public class MovieIndexTest {// ...........Testvoid testCreateMovieIndex() throws IOException {// 创建RequestCreateIndexRequest request new CreateIndexRequest(movie);// 准备请求数据request.source(CREATE_MOVIE, XContentType.JSON);// 发送请求client.indices().create(request, RequestOptions.DEFAULT);}// ........... }删除、获取判断是否存在 public class MovieIndexTest {Testvoid testDelete() throws IOException {DeleteIndexRequest deleteIndexRequest new DeleteIndexRequest(movie);client.indices().delete(deleteIndexRequest,RequestOptions.DEFAULT);}Testvoid testExists() throws IOException {GetIndexRequest getIndexRequest new GetIndexRequest(movie);boolean exists client.indices().exists(getIndexRequest, RequestOptions.DEFAULT);System.out.println(exists);}Testvoid testGet() throws IOException {GetIndexRequest getIndexRequest new GetIndexRequest(movie);GetIndexResponse getIndexResponse client.indices().get(getIndexRequest, RequestOptions.DEFAULT);System.out.println(getIndexResponse);} }3.2 操作文档 【TODO】 结束语 上一篇二、ElasticSearch中索引库与文档操作
http://www.zqtcl.cn/news/852912/

相关文章:

  • 镇江市住房和城乡建设局网站常州建设网站
  • 学做美食的网站男女做暖暖到网站
  • 手机的网站建设目标刚做的网站 搜不到
  • 重庆网站建设哪里比较好呢ps怎么做网站logo
  • 网站建设五项基本原则优化关键词的公司
  • 高端网站的特点p2p网站开发的流程
  • 什么网站做外贸最好坪地网站建设公司
  • 做网站费用怎么核算没有公司 接单做网站
  • 如何建设一个优秀的电商网站wordpress注册去掉电子邮件
  • 站长工具 seo综合查询长沙高校网站制作公司
  • 杭州网站定制开发哪家好wordpress重置
  • 哈尔滨市建设安全网站火车头更新wordpress
  • 做亚马逊外国网站需要语言好吗邢台seo
  • jsp在网站开发中的优势国内哪个推广网站做的好
  • 做网站工资高吗精品资料
  • 做农业需关注什么网站热门代理项目
  • 网站开发公司营业范围照片制作视频软件app
  • 做网站怎么qq邮箱验证免费拥有wordpress
  • 校园网站建设资金来源有wordpress权重
  • 魔站网站开发wordpress 3.3.1
  • 东莞个人免费建网站网站后台管理系统 asp
  • 呼和浩特网站制作 建设wordpress怎么改中文
  • 银医网站建设方案公司网站模板免费下载
  • 优秀网站设计案例中国网站建设东莞公司
  • 自己的公网ip可以做网站网页设计与制作课程思政建设内容
  • 静态网站 搜索搭建织梦网站教程
  • idc 网站备案手机电脑网站建设短视频
  • 做搜狗pc网站优化快速亚马逊云搭建WordPress
  • 免费的建网站软件2020做seo还有出路吗
  • 宁波三优互动网站建设公司怎么样网站建设公司管理流程图