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

ES实战-book笔记1

#索引一个文档,-XPUT手动创建索引,
curl -XPUT 'localhost:9200/get-together/_doc/1?pretty' -H 'Content-Type: application/json' -d '{"name": "Elasticsearch Denver","organizer": "Lee"
}'
#返回结果
{"_index" : "get-together","_id" : "1","_version" : 2,"result" : "updated","_shards" : {"total" : 2,"successful" : 1,"failed" : 0},"_seq_no" : 1,"_primary_term" : 1
}
#kibana 请求
GET /get-together/_search
#响应:
{"took": 277,"timed_out": false,"_shards": {"total": 1,"successful": 1,"skipped": 0,"failed": 0},"hits": {"total": {"value": 1,"relation": "eq"},"max_score": 1,"hits": [{"_index": "get-together","_id": "1","_score": 1,"_source": {"name": "Elasticsearch Denver","organizer": "Lee"}}]}
}
#在kibana 中获取索引的映射_mapping
GET /get-together/_mapping
#响应:
{"get-together": {"mappings": {"properties": {"name": {"type": "text","fields": {"keyword": {"type": "keyword","ignore_above": 256}}},"organizer": {"type": "text","fields": {"keyword": {"type": "keyword","ignore_above": 256}}}}}}
}

#通过curl获取一个索引的映射_mapping
在这里插入图片描述

http://www.lryc.cn/news/297269.html

相关文章:

  • 高防服务器出租的优势及特点
  • NTLM||LM算法lsasswinlogon进程
  • transformer剪枝论文汇总
  • 使用 Ant Design 的 Upload 组件实现图片
  • 【知识图谱--第二讲知识图谱的表示】
  • C语言---计算n的阶乘
  • 材料非线性Matlab有限元编程:初应力法与初应变法
  • QT+OSG/osgEarth编译之八十二:osgdb_obj+Qt编译(一套代码、一套框架,跨平台编译,版本:OSG-3.6.5插件库osgdb_obj)
  • [office] excel求乘积的公式和方法 #媒体#笔记#经验分享
  • OpenEuler20.03LTS SP2 上安装 OpenGauss3.0.0 单机部署过程(二)
  • 从零开始手写mmo游戏从框架到爆炸(十)— 集成springboot-jpa与用户表
  • Python算法题集_两两交换链表中的节点
  • 米贸搜|Facebook在购物季使用的Meta广告投放流程
  • 前端滚动组件分享
  • 【linux开发工具】vim详解
  • Compose | UI组件(十四) | Navigation-Data - 页面导航传递数据
  • 部署一个在线OCR工具
  • 【北邮鲁鹏老师计算机视觉课程笔记】01 introduction
  • maven依赖报错处理(或者maven怎么刷新都下载不了依赖)
  • [VulnHub靶机渗透] dpwwn: 1
  • Android14音频进阶:MediaPlayerService如何启动AudioTrack 下篇(五十六)
  • Python基础篇_修饰符(Decorators)【下】
  • C#,十进制展开数(Decimal Expansion Number)的算法与源代码
  • Vue3快速上手(一)使用vite创建项目
  • 使用navicat导出mysql离线数据后,再导入doris的方案
  • re:从0开始的CSS学习之路 1. CSS语法规则
  • npm install express -g报错或一直卡着,亲测可解决
  • 机器学习11-前馈神经网络识别手写数字1.0
  • vscode wsl远程连接 权限问题
  • VED-eBPF:一款基于eBPF的内核利用和Rootkit检测工具