- _source元数据 ``` PUT /bobotest/_doc/5 { “name”: “lisi”, “desc”: “piaoliang de keai de xiaogege”, “age”: 15, “tags”:”shuaige” } GET /bobotest/_doc/5 response { “_index” : “bobotest”, “_type” : “_doc”, “_id” : “5”, “_version” : 1, “_seq_no” : 16, “_primary_term” : 1, “found” : true, “_source” : { “name” : “lisi”, “desc” : “piaoliang de keai de xiaogege”, “age” : 15, “tags” : “shuaige” } }
_source元数据,在我们创建一个document的时候,放置在request body中的json字符串,默认情况下,在get时,会原封不动的给我们返回回来2. 定制返回结果在document返回时,定制需要返回的那些结果<br />GET /bobotest/_doc/5?_source=desc #需要返回的字段(filed),多个字段可以用逗号“,”隔开
get请求
GET /bobotest/_doc/5?_source=desc
返回结果
{ “_index” : “bobotest”, “_type” : “_doc”, “_id” : “5”, “_version” : 1, “_seq_no” : 16, “_primary_term” : 1, “found” : true, “_source” : { “desc” : “piaoliang de keai de xiaogege” } }
```
