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

国内外ai设计素材网站wordpress图片主题破解版

国内外ai设计素材网站,wordpress图片主题破解版,简历制作专业模板,黄金交易平台app目录 一、新增文档 1、编写测试代码 二、查询文档 1、编写测试代码 三、删除文档 1、编写测试代码 四、修改文档 1、编写测试代码 五、批量导入文档 批量查询 一、新增文档 1、编写测试代码 SpringBootTest public class HotelDocumentTest {private RestHighLevelC…目录 一、新增文档 1、编写测试代码 二、查询文档 1、编写测试代码 三、删除文档 1、编写测试代码 四、修改文档 1、编写测试代码 五、批量导入文档 批量查询 一、新增文档 1、编写测试代码 SpringBootTest public class HotelDocumentTest {private RestHighLevelClient client;Autowiredprivate IHotelService iHotelService;Testvoid testInit(){System.out.println(client);}BeforeEachvoid setUp(){this.client new RestHighLevelClient(RestClient.builder(HttpHost.create(http://192.168.248.152:9200)));}AfterEachvoid tearDown() throws IOException {this.client.close();}Testvoid testAddDocument() throws IOException {Hotel hotel iHotelService.getById(61083L);HotelDoc hotelDoc new HotelDoc(hotel); // 准备request对象IndexRequest request new IndexRequest(hotel).id(hotel.getId().toString()); // 准备Json文档request.source(JSON.toJSONString(hotelDoc),XContentType.JSON); // 发送请求client.index(request, RequestOptions.DEFAULT);}} 二、查询文档 1、编写测试代码 Testvoid testGetDocument() throws IOException { // 准备request对象GetRequest request new GetRequest(hotel,61083); // 接收responseGetResponse response client.get(request,RequestOptions.DEFAULT); // 解析String json response.getSourceAsString();HotelDoc hotelDoc JSON.parseObject(json,HotelDoc.class);System.out.println(hotelDoc);} 三、删除文档 1、编写测试代码 Testvoid testDeleteDocument() throws IOException { // 准备request对象DeleteRequest request new DeleteRequest(hotel,61083); // 发送请求client.delete(request,RequestOptions.DEFAULT);} 四、修改文档 1、编写测试代码 Testvoid testUpdateDocument() throws IOException { // 准备request对象UpdateRequest request new UpdateRequest(hotel,61083); // 准备请求参数request.doc(price,952,starName,四钻 ); // 发送请求client.update(request,RequestOptions.DEFAULT);} 五、批量导入文档 void testBulkRequest() throws IOException{ // 批量查询酒店数据ListHotel hotelList iHotelService.list(); // 创建RequestBulkRequest request new BulkRequest(); // 准备参数for (Hotel hotel : hotelList){ // 转换为文档类型HotelDocHotelDoc hotelDoc new HotelDoc(hotel); // 创建新增文档的Request对象request.add(new IndexRequest(hotel).id(hotelDoc.getId().toString()).source(JSON.toJSONString(hotelDoc),XContentType.JSON));} // 发送请求client.bulk(request,RequestOptions.DEFAULT);} 批量查询
http://www.dnsts.com.cn/news/141662.html

相关文章:

  • 自己做网站运营小程序个人主页模板
  • 福建福州罗源建设局网站网业云原神
  • 网站上的3d产品展示怎么做深圳做外贸网站哪家好
  • wordpress做资源下载站手机优化软件排名
  • 企业网站做口碑营销手机商城网站制作公司
  • 微信微网站怎么进入oa手机端app下载
  • 贵州省建设厅网站查怎么做网站播放器
  • 中国六冶的网站谁做的做视频网站需要哪些手续
  • 怎么制作自己的链接网站seo案例
  • 单页网站如何做泰安五险一金的工作最新招聘
  • 西安做网站的公司排名福州网络营销推广产品优化
  • 网站上线后wordpress 伪静态 子目录
  • 会员制网站搭建wordpress小升初最好的补课机构排行榜
  • 百度地图网站后台更新网上找工程平台有哪些
  • 做英文网站要用什么字体WordPress有赞支付
  • 谷德设计网站陕西建设网网
  • 咸阳个人兼职网站建设怎样找到专业做网站人
  • 淘宝上找人做网站建筑工程分包平台
  • 百度网站名称2345网址导航官网下载
  • 专业的家居行业网站制作学校网站登录入口
  • wordpress 网站描述大数据培训班出来能就业吗
  • shanxi建设银行网站首页秦皇岛属于河北哪个市
  • 苏州网页模板建站长沙网站关键词
  • 坪山网站建设行业现状网站设计团队介绍
  • 开设公司网站wordpress小型论坛插件
  • 建设企业银行官方网站东营网上房地产
  • 简单 大气 网站模版wordpress 3.4 漏洞
  • 网站网络推广方案做排版的网站
  • 河北住房和建设厅官方网站汽配网站开发
  • 完整网站模板下载wordpress中国网站模板