| { “_index”: “testindex”, “_type”: “testtype”, “_id”: “2”, “_version”: 1, “found”: true, “_source”: { “field1”: “value1”, “field2”: “value2” } } |
|---|
一、_source元数据
我们在创建一个document的时候,使用的那个放在request body中的json串,默认情况下,在GET的时候会原封不动的返回。
二、定制返回结果
给GET请求指定_source参数
| GET /testindex/testtype/2?_source=field2,field1 |
|---|
