2016-06-21 05:27:27 -04:00
|
|
|
[[search-request-docvalue-fields]]
|
|
|
|
=== Doc value Fields
|
|
|
|
|
2016-06-23 03:44:33 -04:00
|
|
|
Allows to return the <<doc-values,doc value>> representation of a field for each hit, for
|
2016-06-21 05:27:27 -04:00
|
|
|
example:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
GET /_search
|
|
|
|
{
|
|
|
|
"query" : {
|
|
|
|
"match_all": {}
|
|
|
|
},
|
|
|
|
"docvalue_fields" : ["test1", "test2"]
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
|
|
|
|
Doc value fields can work on fields that are not stored.
|
|
|
|
|
|
|
|
Note that if the fields parameter specifies fields without docvalues it will try to load the value from the fielddata cache
|
|
|
|
causing the terms for that field to be loaded to memory (cached), which will result in more memory consumption.
|
|
|
|
|