본문 바로가기

elastic

elastic geo_point type의 field 만들기 -geospatial fields

반응형
curl -XPUT -u elastic:패스워드 http://192.168.16.148:9200/my-index-000001 -H 'Content-Type: application/json' -d '
{
  "mappings": {
    "properties": {
      "location": {
        "type": "geo_point"
      }
    }
  }
}'

index에 미리 만들어놓고 덮어쓰기

결과

{"acknowledged":true,"shards_acknowledged":true,"index":"my-index-000001"}1001460000@logstash-node-0:/usr/share/logstash/bin$ 

 

반응형