| 关闭 | "_source": false |
|---|---|
| 数组写法 | "_source": ["obj.*", "user.name"] |
| 对象写法 | { "includes": [...], "excludes": [...] } |
示例
示例
GET /my-index/_search
{
"_source": { "includes": ["title", "user.*"], "excludes": ["user.password"] },
"query": { "match_all": {} }
}字段很宽的表建议按需取 _source,或使用 stored_fields / docvalue_fields 降低网络与序列化开销。