Problems encountered on the first day of Elastic learning and some operations added, the first day of elastic

Source: Internet
Author: User

Problems encountered on the first day of Elastic learning and some operations added, the first day of elastic

1. After the installation is started,

Error:

ERROR: max file descriptors [1024] for elasticsearch process likely too low, increase to at least [65536]

You need to set max file descriptors to 65536, because the common user is 1024 (my machine ). the answer on the internet is that you can use ulimint-n to modify it, but after using this command. Run the command ulimint-a to check whether the error is 65536 on the console, but the error is the same after startup. The correct method should be to directly modify

Add the configuration file at the end of the configuration file.

2.

Create an index
Curl-XPUT 'localhost: 9200/customer? Pretty & pretty'

View All indexes
Curl-XGET 'localhost: 9200/_ cat/indices? V & pretty'

Create a document domain/{index}/{type}/id
Curl-XPUT 'localhost: 9200/customer/external/1? Pretty & pretty '-d'
{
"Name": "John Doe"
}'

View the document with id 1
Curl-XGET 'localhost: 9200/customer/external/1? Pretty & pretty'

Delete index
Curl-XDELETE 'localhost: 9200/customer? Pretty & pretty'
View
Curl-XGET 'localhost: 9200/_ cat/indices? V & pretty'

Modify the limit: vim/etc/security/limits. conf: Change open file to 63356.

Curl-XPOST 'localhost: 9200/customer/external? Pretty & pretty '-d'
{
"Name": "Jane Doe"
}'

Update:
Curl-XPOST 'localhost: 9200/customer/external/1/_ update? Pretty & pretty '-d'
{
"Doc": {"name": "Jane Doe "}
}'

Command Format:
<REST Verb>/<Index>/<Type>/<ID>

 

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.