We should avoid indexing large documents since Elasticsearch has a default maximum content size, and if we try to index a document that crosses this limit, Elasticsearch will refuse to index the document. Elasticsearch's default maximum length for any document is 100 MB, and it is defined using the following configuration:
http.max_content_length
Although we can increase the default max_content_length
in Elasticsearch, it is not recommended to increase the limit. Large document sizes increase network load, and we will lose the benefit of Elasticsearch because the main advantage of Elasticsearch lies in the search capabilities and speed that it provides. If we index a large document, it puts stress on memory usage, disks, and also on the network.
It is required to understand the data that we are going to index before indexing it into Elasticsearch, such as categorizing it in order to conclude...