Use Curl to operate elasticsearch under window

Source: Internet
Author: User

1. Download curlzip,https://curl.haxx.se/download.html;

2. Unzip, locate the Curl.exe in the Bin folder, right-click "Run as Administrator", cmd e: Change the letter; appear E:\Work\curl-7.46.0-win64\curl-7.46.0-win64\bin;

3.curl localhost:9200/

Querying the health status of a cluster

Curl Localhost:9200/_cat/health?v

List of query nodes

Curl Localhost:9200/_cat/nodes?v

To view all indexes:

Curl Localhost:9200/_cat/indices?v

To create an index:

Curl-xput Localhost:9200/customer?pretty

Set type Type,\ ", slash plus double quotation marks

Curl-xput localhost:9200/customer/external/1?pretty-d "{\" name\ ": \" fred\ "}"

Inquire:

Curl-xget Localhost:9200/customer/external/1?pretty

To delete an index:

Curl-xdelete Localhost:9200/customer?pretty

Some commands do not work, you can also download Cygwin, instead of DOS operation, or install Elasticsearch Head

Search elasticsearch5.0 Plugin Windows

Plug - ins

https://www.oschina.net/translate/elasticsearch-getting-started

Use Curl to operate elasticsearch under window

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.