dsl语法(es基本使用)
索引库
1.创建索引库
put /索引库名{参数}
语法格式:
案例:
#创建索引库
PUT /xzm
{"mappings": {"properties": {"info":{"type": "text","analyzer": "ik_smart"},"email":{"type": "keyword","index": false },"name":{"type": "object","properties": {"firstName":{"type": "keyword"},"lastName":{"type":"keyword"}}}}}
}
2.查看索引库
get /索引库名
3.删除索引库
delete /索引库名
4.修改索引库(索引库不能修改,只能添加属性)
文档
1.新增数据
2.查询文档
3.删除文档
4.修改文档
注: