Determining Size of A Document

Hi all,

How am I supposed to determine the size of an individual document?

Can I use dev tools in some way to query the size of a document with a specific _id?

I know I can get the size of the entire index with a:

GET _cat/indices

I can also get an average by just dividing the size by the number of events, but each of my events are different sizes obviously.

I was just wondering if there was something similar for individual 'events' or 'documents'?

This might be what you are looking for: https://www.elastic.co/guide/en/elasticsearch/plugins/current/mapper-size.html

Hi @dadoonet,

Thanks for the response. Do you know how this is done when using elastic cloud rather than hosting it myself?

Jason

You can add the plugin in elastic cloud. I just checked it:

Click on Edit button in your deployment and check for Elasticsearch plugins and settings.

1 Like

@dadoonet

Perfect thank you.

And with regards to the _source metadata field, I don't currently have that appearing on my documents however it is enabled:

Is this field the requirement for the _size field to work?

yes it is. The doc says:

The mapper-size plugin provides the _size meta field which, when enabled, indexes the size in bytes of the original _source field.

No source. No size.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.