elastastic search

Posted mhc-fly

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了elastastic search相关的知识,希望对你有一定的参考价值。

curl -X PUT "10.97.184.40:9200/logstash-2015.05.18" -H ‘Content-Type: application/json‘ -d‘
{
  "mappings": {
    "log": {
      "properties": {
        "geo": {
          "properties": {
            "coordinates": {
              "type": "geo_point"
            }
          }
        }
      }
    }
  }
}


curl -X PUT "10.97.184.40:9200/logstash-2015.05.19" -H ‘Content-Type: application/json‘ -d‘
{
  "mappings": {
    "log": {
      "properties": {
        "geo": {
          "properties": {
            "coordinates": {
              "type": "geo_point"
            }
          }
        }
      }
    }
  }
}

curl -X PUT "10.97.184.40:9200/logstash-2015.05.20" -H ‘Content-Type: application/json‘ -d‘
{
  "mappings": {
    "log": {
      "properties": {
        "geo": {
          "properties": {
            "coordinates": {
              "type": "geo_point"
            }
          }
        }
      }
    }
  }
}



curl -H ‘Content-Type: application/x-ndjson‘ -XPOST ‘10.97.184.40:9200/bank/account/_bulk?pretty‘ --data-binary @accounts.json
curl -H ‘Content-Type: application/x-ndjson‘ -XPOST ‘10.97.184.40:9200/shakespeare/doc/_bulk?pretty‘ --data-binary @shakespeare_6.0.json
curl -H ‘Content-Type: application/x-ndjson‘ -XPOST ‘10.97.184.40:9200/_bulk?pretty‘ --data-binary @logs.jsonl

curl -X GET "10.97.184.40:9200/_cat/indices?v"





























































以上是关于elastastic search的主要内容,如果未能解决你的问题,请参考以下文章