Elasticsearch change from 0.90 (0.90.x) to 1.2 (1.x) API-Two

Source: Internet
Author: User

This article is for the translation of official documents and personal understanding. When the author translates, the version of Elasticsearch (hereinafter referred to as ES) is 1.2.2. Please support original: http://www.cnblogs.com/donlianli/p/3836768.html I. Changes in statistical information-related ordersFor cluster state Cluster_state, node information Nodes_info, node statistics nodes_stats and index Information indices_stats command format are unified, such as viewing the cluster information using command:
Curl-xget Http://localhost:9200/_cluster/state/nodes?pretty=1

To view node statistics:

Curl-xget http://localhost:9200/_nodes/stats?pretty=1 Cluster statistical information Curl-xget Http://localhost:9200/_cluster/stats?pretty=1
Second, index-related API
The order of mapping, alias, settings, and warmer related commands and parameters is adjusted. The new order and format are as follows:
Curl-xput http://Localhost:9200/{indices}/_mapping/{type}Curl-xput http://Localhost:9200/{indices}/_alias/{name}Curl-xput http://Localhost:9200/{indices}/_warmer/{name}Curl-xget http://Localhost:9200/{indices}/_mapping/{types}Curl-xget http://Localhost:9200/{indices}/_alias/{names}Curl-xget http://Localhost:9200/{indices}/_settings/{names}Curl-xget http://Localhost:9200/{indices}/_warmer/{names}Curl-xdelete http://Localhost:9200/{indices}/_mapping/{types}Curl-xdelete http://Localhost:9200/{indices}/_alias/{names}Curl-xdelete http://Localhost:9200/{indices}/_warmer/{names}

where {Indices},{type} and {name} can be any of the following:
    • _all, * or empty, these 3 values mean the same, representing all possible values
    • Wildcard characters, such as "test*"
    • Comma-delimited list, for example: index_1,test_*
The only exception is the delete command, which does not receive an empty value. If you want to delete anything, you must specify it explicitly. Similarly, the results returned by the GET command are also unified.
    1. A specific value is returned only if the query has a result, otherwise, only an empty object {} is returned. When the mapping,warmer,alias,setting of a query does not exist, 404 is no longer returned.
    2. If the result is queried, the result always contains the index name, then the section, and then the element name. For example:

{
"My_index": {
"Mappings": {
"My_type": {...}
}
}
}

Above is the result returned by the Get_mapping API.

In the future we'll also provide plural versions to allow putting multiple mappings etc in a single request.

It's like saying that you can set up two versions of mappings in a request.

Original address: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/_stats_and_info_apis.htmlhttp:// Www.elasticsearch.org/guide/en/elasticsearch/reference/current/_indices_apis.html to Be Continued ... About me, Handan people. Interested in this kind of topic? Welcome to send mail to [email protected] For more information about Elasticsearch, please refer to: Http://www.iteye.com/blogs/subjects/elasticsearch-tutor

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.