zoukankan      html  css  js  c++  java
  • 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>

  • 相关阅读:
    de4dot 反混淆
    GreyMagic
    HearthBuddy 第一次调试
    dnSpy
    asp.net form submit 在Chrome里面看Form提交
    关于并发模型 Actor 和 CSP
    Go语言并发机制初探
    CyclicBarrier的工作原理及其实例
    Java并发编程--CyclicBarrier
    CountDownLatch的简单理解
  • 原文地址:https://www.cnblogs.com/zr520/p/6071171.html
Copyright © 2011-2022 走看看