What is a document?

Documents in Elasticsearch are represented in JSON format. JSON objects are written in key/value pairs. A key must be a string and must always be enclosed in quotation marks. The value must be a valid JSON datatype. Keys and values are separated by colons and with the key/value pair separated by commas. A document will be associated with metadata elements during indexing operations including the given index name, the mapping type, and the document identifier.

The document identifier can be given or autogenerated. Recall that Elasticsearch has a simple hashing formula to calculate the route that routes a document to a particular shard for storage or search. The simple formula is as follows, and the default routing value is the document identifier:

shard = hash(routing) % number_of_primary_shards
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.70.248