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

天乐测绘网做网站吗佛山网站建设哪家评价高

天乐测绘网做网站吗,佛山网站建设哪家评价高,wordpress 的主题在哪个文件夹,搜索网站开发背景个人名片#xff1a; 博主#xff1a;酒徒ᝰ. 个人简介#xff1a;沉醉在酒中#xff0c;借着一股酒劲#xff0c;去拼搏一个未来。 本篇励志#xff1a;三人行#xff0c;必有我师焉。 本项目基于B站黑马程序员Java《SpringCloud微服务技术栈》#xff0c;SpringCloud… 个人名片 博主酒徒ᝰ. 个人简介沉醉在酒中借着一股酒劲去拼搏一个未来。 本篇励志三人行必有我师焉。 本项目基于B站黑马程序员Java《SpringCloud微服务技术栈》SpringCloudRabbitMQDockerRedis搜索分布式 【SpringCloudRabbitMQDockerRedis搜索分布式系统详解springcloud微服务技术栈课程|黑马程序员Java微服务】 点击观看 目录 四、RestAPI 四、RestAPI ES官方提供了各种不同语言的客户端用来操作ES。 这些客户端的本质就是组装DSL语句通过http请求发送给ES。 官方文档地址https://www.elastic.co/guide/en/elasticsearch/client/index.html 案例利用JavaRestClient实现创建、删除索引库判断索引库是否存在 准备工程 导入项目 导入mysql数据 修改application.yaml中的url和password改为自己数据库的位置和密码创建索引库 导入es依赖 dependencygroupIdorg.elasticsearch.client/groupIdartifactIdelasticsearch-rest-high-level-client/artifactId /dependency更改es版本为我们当前使用的版本 propertieselasticsearch.version7.12.1/elasticsearch.version /properties初始化代码 public class HotelIndexTest {private RestHighLevelClient client;BeforeEachvoid setUp() {this.client new RestHighLevelClient(RestClient.builder(HttpHost.create(http://192.168.179.128:9200)));}AfterEachvoid tearDown() throws IOException {this.client.close();} }建立DSL的JSON参数部分 package cn.itcast.hotel;public class HotelConstants {public static final String MAPPING_TEMPLATE {\n \mappings\: {\n \properties\: {\n \id\: {\n \type\: \keyword\\n },\n \name\: {\n \type\: \text\,\n \analyzer\: \ik_max_word\,\n \copy_to\: \all\\n },\n \address\: {\n \type\: \keyword\,\n \index\: false\n },\n \price\: {\n \type\: \integer\\n },\n \score\: {\n \type\: \integer\\n },\n \brand\: {\n \type\: \keyword\,\n \copy_to\: \all\\n },\n \city\: {\n \type\: \keyword\\n },\n \starName\: {\n \type\: \keyword\\n },\n \business\: {\n \type\: \keyword\,\n \copy_to\: \all\\n },\n \location\: {\n \type\: \geo_point\\n },\n \pic\: {\n \type\: \keyword\,\n \index\: false\n },\n \all\: {\n \type\: \text\,\n \index\: true,\n \analyzer\: \ik_max_word\\n }\n }\n }\n }; } 发送请求 Test void testCreateHotelIndex() throws IOException {CreateIndexRequest request new CreateIndexRequest(hotel);request.source(MAPPING_TEMPLATE, XContentType.JSON);client.indices().create(request, RequestOptions.DEFAULT); } 删除索引库 Test void testDeleteHotelIndex() throws IOException {DeleteIndexRequest request new DeleteIndexRequest(hotel);client.indices().delete(request, RequestOptions.DEFAULT); }判断索引库是否存在 Test void testExitsHotelIndex() throws IOException {GetIndexRequest request new GetIndexRequest(hotel);boolean exists client.indices().exists(request, RequestOptions.DEFAULT);System.out.println(exists); }总结 JavaRestClient操作elasticsearch的流程基本类似。 核心是client.indices()方法来获取索引库的操作对象。 索引库操作的基本步骤 初始化RestHighLevelClient 创建XxxIndexRequest。XXX是Create、Get、Delete 准备DSL Create时需要其它是无参 发送请求。调用RestHighLevelClient#indices().xxx()方法xxx是create、exists、delete
http://www.zqtcl.cn/news/501156/

相关文章:

  • 河南省建设工程招投标协会网站安卓开发软件工具
  • 中国空间站wordpress无法选择服务器配置
  • 郑州家居网站建设服务公司asp网站助手
  • 做网站一般几个人WordPress 中英文翻译
  • 有没有兼职做网站的化工企业建网站
  • 石家庄展厅设计公司黑帽seo怎么做网站排名
  • 网站开发维护成本计算wordpress 无法访问
  • 永久免费做网站营销软文广告
  • 网站规划怎么写wordpress如何搭建博客
  • 网站索引页面网站做302重定向会怎么样
  • 精品成品冈站源码免费企业网站的内容模块
  • 网站策划的最终体现南宁网站建设培训学校
  • 网站不备案打不开怎么建网站不用买空间
  • 有没有IT做兼职的网站百度收录入口提交
  • 普洱市建设局网站重庆工程建设信息查询
  • 上海网站设计多少钱wap网站生成微信小程序
  • 广州网站到首页排名做图骂人的图片网站
  • 公司的网站建设价格wordpress付费阅读文章功能
  • 飞鸽网站建设建设网站什么软件比较好
  • 网站名称 规则网站seo完整seo优化方案
  • 昆明网站建设高端定制wordpress建站课程
  • 建网站外包wordpress 便利贴
  • 硅胶 技术支持 东莞网站建设网站互联网接入商
  • 太平洋建设21局网站微信网页版登录手机版
  • 站长统计芭乐鸭脖小猪电商平台哪个最好
  • 女与男爱做电影网站免费企业公司网站建设方案
  • 尚品本色木门网站是哪个公司做的大庆建设公司网站
  • 做网做网站建设的网站怎么用别人网站做模板
  • 电子商务网站购物车怎么做网站站点创建成功是什么意思
  • 如何做招聘网站的评估新浪微博可以做网站吗