5.1 url 查询数据
5.1.1 一般查询 用GET
json风格:curl -XGET http://192.168.1.3:9200/ibeifeng/produce/1 -H 'Content-Type:application/json'
pretty风格:curl -XGET http://192.168.1.3:9200/ibeifeng/produce/1?pretty -H 'Content-Type:application/json'
返回指定的字段:curl -XGET http://192.168.1.3:9200/ibeifeng/produce/1?pretty\&_source=name -H 'Content-Type:application/json'【注意需要加转义字符】
curl -XGET http://192.168.1.3:9200/ibeifeng/produce/1?pretty\&_source=name,price -H 'Content-Type:application/json'【注意需要加转义字符,只筛选部分列】
_source_include 只看某一部分
curl -XGET http://192.168.1.3:9200/ibeifeng/produce/1?pretty\&_source_include=name,price -H 'Content-Type:application/json'
_source_exclude 不看某一部分
curl -XGET http://192.168.1.3:9200/ibeifeng/produce/1?pretty\&_source_exclude=name,price -H 'Content-Type:application/json'