27 lines
604 B
Plaintext
27 lines
604 B
Plaintext
|
[[mapping-size-field]]
|
||
|
=== `_size`
|
||
|
|
||
|
The `_size` field allows to automatically index the size of the original
|
||
|
`_source` indexed. By default, it's disabled. In order to enable it, set
|
||
|
the mapping to:
|
||
|
|
||
|
[source,js]
|
||
|
--------------------------------------------------
|
||
|
{
|
||
|
"tweet" : {
|
||
|
"_size" : {"enabled" : true}
|
||
|
}
|
||
|
}
|
||
|
--------------------------------------------------
|
||
|
|
||
|
In order to also store it, use:
|
||
|
|
||
|
[source,js]
|
||
|
--------------------------------------------------
|
||
|
{
|
||
|
"tweet" : {
|
||
|
"_size" : {"enabled" : true, "store" : "yes"}
|
||
|
}
|
||
|
}
|
||
|
--------------------------------------------------
|