Elastic學習第一天遇到的問題以及添加的一些操作,elastic第一天

來源:互聯網
上載者:User

Elastic學習第一天遇到的問題以及添加的一些操作,elastic第一天

1.剛開始安裝好了之後,啟動之後,

報錯:

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

需要設定max file descriptors為65536,出現這個是因為普通的使用者是1024的(我機器).網上的答案是說使用ulimint -n修改就可以了,但是我使用這個指令之後。使用指令ulimint-a查看控制台顯示確實是是65536,但是啟動之後,還是相同的錯誤。正確的做法應該是直接修改

這個設定檔,在最末尾添加  就ok啦。

2.

建立一個index
curl -XPUT 'localhost:9200/customer?pretty&pretty'

查看所有的index
curl -XGET 'localhost:9200/_cat/indices?v&pretty'

建立一個document domain/{index}/{type}/id
curl -XPUT 'localhost:9200/customer/external/1?pretty&pretty' -d'
{
"name": "John Doe"
}'

查看id為1的document
curl -XGET 'localhost:9200/customer/external/1?pretty&pretty'

刪除index
curl -XDELETE 'localhost:9200/customer?pretty&pretty'
查看
curl -XGET 'localhost:9200/_cat/indices?v&pretty'

修改限制:vim /etc/security/limits.conf 修改open file 為63356

curl -XPOST 'localhost:9200/customer/external?pretty&pretty' -d'
{
"name": "Jane Doe"
}'

更新:
curl -XPOST 'localhost:9200/customer/external/1/_update?pretty&pretty' -d'
{
"doc": { "name": "Jane Doe" }
}'

命令的格式:
<REST Verb> /<Index>/<Type>/<ID>

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.