elasticsearch command
基础命令
创建索引
创建名为xxx-span-2021-12-11
的索引PUT /xxx-span-2021-12-11 { "mappings": { "properties": { "tags.source.uri": { "type": "keyword" } } } }
查看索引和映射
有了映射才能在 Kibana 中做查询和图标GET /xxx-span-2021-12-11 GET /xxx-span-2021-12-11/_mapping
删除索引
DELETE /index_*
模板操作
GET _template/xxx-span_template DELETE _template/xxx-span_template
查询
GET /xxx-span-2021-12-11/_search { "query": { "match": { "traceId": { "query": "bf2a201e835028ecae23c324e85b9855" } } } }