摘要:
# elasticsearch中的三种模式 # 第一种动态模式 默认就是dynamic模式 PUT mapping { "mappings": { "properties": { "name":{ "type": "keyword" }, "age":{ "type": "long" } } } } 阅读全文
摘要:
elasticsearch中的聚合函数 elasticsearch中的聚合函数求出平均年龄 计算出蜀国人物的平均年龄 GET test1/_search { "query": { "match": { "location.keyword": "蜀国" } }, "aggs": { "age_avg" 阅读全文
摘要:
elasticsearch中的布尔查询 例如查询年龄是25岁,输入王者荣耀的英雄 GET test1/_search { "query": { "bool": { "must": [ { "match": { "age": "25" } }, { "match": { "location": "王者 阅读全文
摘要:
elasticsearch的查询方法 创建索引 PUT test1 添加数据,可以指定id POST test1/_doc/2 { "name":"刘备", "age":54, "location":"蜀国" } 查询操作两种方法 · 第一种 GET test1/_search?q=location 阅读全文