본문 바로가기

내가 당면한 문제와 해결방안

create index with mapping

PUT 호스트명/인덱스명

{
  "mappings": {
    "_doc": {
      "properties": {
        "boundaries": {
          "type": "geo_shape",
          "ignore_malformed": true,
          "precision": "1.0m",
          "strategy": "recursive",
          "distance_error_pct": 0.009
        },
        "boundaries_nearby": {
          "type": "geo_shape",
          "ignore_malformed": true,
          "precision": "1.0m",
          "strategy": "recursive",
          "distance_error_pct": 0.009
        },
        "boundaries_nearby_auto": {
          "type": "geo_shape",
          "ignore_malformed": true,
          "precision": "1.0m",
          "strategy": "recursive",
          "distance_error_pct": 0.009
        },
        "location": {
          "type": "geo_point"
        },
        "point": {
          "type": "geo_shape",
          "ignore_malformed": true,
          "precision": "1.0m",
          "strategy": "recursive",
          "distance_error_pct": 0.009
        }
      }
    }
  }
}