This is the 10th day of my participation in the August More text Challenge. For details, see: August More Text Challenge

If ❤️ my article is helpful, welcome to like, follow. This is the greatest encouragement for me to continue my technical creation. More past articles in my personal column

The Document (the Document)

  • Elasticsearch is document-oriented, and a document is the smallest unit of all searchable data
    • Log entries in log files
    • Details of a movie/a record
    • Details of a song in an MP3 player/a PDF document
  • The document is serialized to JSON format and stored in asticSearch
    • A JSON object consists of fields
    • Each field has a corresponding field type (string/number/Boolean/date/binary/range type)
  • Each document has a Unique 0
    • You can specify your own ID
    • Or automatically generated by Elasticsearch

The metadata of the document

Metadata, which is used to annotate information about a document

  • _index- The name of the index to which the document belongs
  • _type- The name of the type to which the document belongs
  • Id – Document unique ID
  • _source: Raw JSON data for the document
  • _alk integrates all field contents into this field, has been deprecated
  • _version: indicates the version of the document
  • _score: Correlation score

The index

An index is a container of documents, a collection of documents of a class

  • Indexes embody the concept of logical space: Each Index has its own Mapping definition, which defines the field names and types of the contained documents
  • The Shard represents the concept of physical space. The data scores in the index are on the Shard
  • Mapping Defines the types of document fields
  • Setting Defines different data distributions (shards)

Improper mysql/ES comparison

RDBMS | Elasticsearch Table | Index(Type) Row | Document Column | Filed Schema | Mapping SQL | DSL

  • Before 7.0, an Index can have multiple Types and has been Deprecated, since 7.0, an Index only has one birth parent of Type – “_doc”
  • The difference between traditional relational database and Elasticsearch

Elasticsearch- Schemaless/correlation etch /

  • High-performance full-text search => ES
  • RDMS – transactional/Join => MySQL

Kibana operation

Management index

  • Kibana > Left Stack Manager > Index Management

Development tools, REST API

  • GET /_cat/indices/kibana*? v&s=index
  • Status index query: GET /_cat/indices? v&health=green
  • GET /_cat/indices? v&s=docs.count:desc
  • GET /_cat/indices? v&h=i,tm&s=tm:desc
  • GET /_cat/indices/ Kibana *? pri&v&h=health,index,pri,rep,docs,count,mt