head插件地址 http://127.0.0.1:9200/_plugin/head
查看映射mapping curl -XGET 'http://127.0.0.1:9200/prod/product/_mapping'
删除索引(库)curl -XDELETE 'http://127.0.0.1:9200/prod'
写映射 curl -XPUT 'http://127.0.0.1:9200/prod' -d '{"mappings":{"product":{"properties":{"countryId":{"type":"string","index":"not_analyzed"}}}}}'
es1.7地址: http://pan.baidu.com/s/1hsFkCYC
{"query":{"filtered":{"query":{"multi_match":{"query":"茶","type":"best_fields","minimum_should_match":"80%","fields":["prodName"]}},"filter":{}}},"highlight":{"pre_tags":["<font color='red'>"],"post_tags":["</font>"],"fields":{"prodName":{}}},"aggs":{"catalogList":{"terms":{"field":"cataId"}},"countryList":{"terms":{"field":"countryId"}},"catalogBrandList":{"terms":{"field":"brandId"}}},"sort":[],"from":0,"size":12}
本文介绍了Elasticsearch的基本操作,包括使用Head插件、通过curl命令进行索引的增删查改以及映射设置等。提供了实用的命令示例,如查看映射、删除索引及创建映射等。
1万+

被折叠的 条评论
为什么被折叠?



