size-field.asciidoc 604 B

1234567891011121314151617181920212223242526
  1. [[mapping-size-field]]
  2. === `_size`
  3. The `_size` field allows to automatically index the size of the original
  4. `_source` indexed. By default, it's disabled. In order to enable it, set
  5. the mapping to:
  6. [source,js]
  7. --------------------------------------------------
  8. {
  9. "tweet" : {
  10. "_size" : {"enabled" : true}
  11. }
  12. }
  13. --------------------------------------------------
  14. In order to also store it, use:
  15. [source,js]
  16. --------------------------------------------------
  17. {
  18. "tweet" : {
  19. "_size" : {"enabled" : true, "store" : "yes"}
  20. }
  21. }
  22. --------------------------------------------------