I have done below steps but still not getting the document size in result.
Installed mapper-size plugin.
Enabled _size also and its reflecting in index mapping
curl -X PUT "localhost:9200//_mapping" -H 'Content-Type: application/json' -d'
{
"_size": {
"enabled": true
}
}’
When i am executing search apis, still not getting document size in response.
ok, basically i have detailed-description field in the document, this field can have 50KB of data in api request so document size can be 50KB max.
I am doing capacity planning for the data nodes, I know elastic uses Lz4 for compression but want to make sure whats the total size of document in elastic against the 50KB of data on client side. Do we have any plugin or some api which can return the saved document size on elastic.
In addition of what @dadoonet mentioned (getting size reported on file system), "total size" is also influenced by number of segments.
Compression mostly happens within a segment, so depending on your use cases, if you are creating a lot of small segments, the reported size might be bigger compared to after segment merging happened.
So I would suggest to also consider recording number of segments when you are polling the index size to avoid wrong capacity planning.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.