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>