The understanding of mapping in ES

Source: Internet
Author: User

(1) inserting the data directly into ES, ES will automatically index and establish the type and corresponding mapping

(2) The data type of each field is automatically defined in mapping

(3) different data types (for example, text and date), either exact value or full text

(4) Exact value, when establishing the inverted index, when the word breaker, is the whole value together as a keyword into the inverted index to go; Full text, will undergo a variety of processing, participle, normaliztion (temporal conversion, synonym conversion, case conversion), will be built into the inverted index.

(5) Exact value and full text Type field determine that when a search comes in, the exact value field or full text field is not the same as the behavior of the search, will be consistent with the behavior of creating inverted index For example, when exact value is searched, it is matched directly to the entire value, full text query string, and then the word breaker and normalization to the inverted index to search.

(6) can use the dynamic mapping es, let it automatically establish mapping, including the automatic setting of data type, you can manually create the index and type of mapping in advance, you set the fields, including data type, index behavior, word breaker and so on

Mapping is the metadata for the type of index, and each type has its own mapping, which determines the data type, the behavior of the inverted index, and the behavior of the search.

1. Mapping Core Data type

String,byte,short,integer,long,float,double,boolean,date

2. Dynamic mapping

True or false--and Boolean

123--long

123.45--Double

2017-01-01--Date

"Hello World"--string/text

3. View mapping

Get/index/_mapping/type

  

The understanding of mapping in ES

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.