https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html#mappings
Create index API | Elasticsearch Reference [7.5] | Elastic
Before 7.0.0, the mappings definition used to include a type name. Although specifying types in requests is now deprecated, a type can still be provided if the request parameter include_type_name is set. For more details, please see Removal of mapping type
www.elastic.co
그냥 만들어도 되는데, 필드가 geo_shape 로 매핑되어야한다면. 해야하는 작업.
1) 만들고자 하는 인덱스 이름 with mapping definition을 전송.
2) host get하면 version check 할 수 있으니. 그것 확인 후에. 나의 경우에는 6.7 이므로.
https://www.elastic.co/guide/en/elasticsearch/reference/6.7/indices-put-mapping.html
여기 확인해서....
PUT https://호스트/만들고자 하는 인덱스 이름/_mapping/doc
{
"properties": {
"boundaries": {
"type": "geo_shape",
"ignore_malformed": true,
"precision": "1.0m",
"strategy": "recursive",
"distance_error_pct": 0.009
}
}
}
2 이제 reindex 해야댐 헠헠
POST _reindex { "source": { "index": "twitter" }, "dest": { "index": "new_twitter" } }
3 alias
POST /_aliases
{
"actions" : [
{ "add" : { "index" : "expedia_migrated_poi_20191203_3", "alias" : "expedia_poi" } }
]
}
참고
https://www.elastic.co/guide/en/elasticsearch/reference/6.7/mapping.html
https://www.elastic.co/guide/en/elasticsearch/reference/6.7/indices-put-mapping.html
https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-reindex.html
https://www.elastic.co/guide/en/elasticsearch/reference/6.7/indices-aliases.html
'내가 당면한 문제와 해결방안' 카테고리의 다른 글
elasticsearch ngram existing index 에설정 (0) | 2019.12.12 |
---|---|
파이썬으로 멀티쓰레드 어케하냐 마-! (0) | 2019.12.11 |
python find element in dictionary list using key value (0) | 2019.11.21 |
데이터마이그레이션 (0) | 2019.10.22 |
List vs ArrayList in java (0) | 2019.10.18 |