How to build the mappings in Elasticsearch?

Source: Internet
Author: User

Just contact Elasticsearch, many things will not be used, Baidu a lot, do not understand, finally found out the simplest way to build mappings through HTTP ~

Some people in the establishment of mappings newspaper various errors, first, if you have the data in this index, you want to modify, the simplest way to re-establish a new index, after successful, then switch.

1. Example description, create a new index named RDX_INDEX_V2

The part of the mosaic that is your server address

3. Set Mappings Format Demo:

{  "Settings": {    "Number_of_shards": 5  }, "mappings": {    "Rdx_type": {      "Properties": {        "Zhanghu": {          ' Type ': ' String '        }, "Zy_mingzi": {          ' Type ': ' String '        }, "Zy_xingbie": {          "Type": "string", "index": "Not_analyzed"        }, "zy_leixing": {          "Type": "string", "index": "Not_analyzed"        }, "Zy_hezuo_zishu": {          ' type ': ' Integer '        }      }    }  }}

4. Click Submit Request, Success ~

PS: There is a problem, you can leave a message to ask ~

How to build the mappings in Elasticsearch?

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.