이름에 '.'이 포함되어 있기 때문에 이름을 바꿀 필요가있는 elasticsearch (5.5.1)에 필드가 있습니다. 다양한 문제를 야기하고있다. 이름을 바꿀 필드는 다른 필드 안에 중첩되어 있습니다.elasticsearch rename processor 및 ingest pipeline으로 점을 포함하는 중첩 된 필드의 이름을 바꾸는 방법
여기에 설명 된대로 내가 다시 색인화 작업을 수행하기 위해 인제 스트 파이프 라인에서 이름 바꾸기 프로세서를 사용하는 것을 시도하고있다: https://stackoverflow.com/a/43142634/5114 여기
내 파이프 라인 시뮬레이션 요청 (테스트 할 키바의 개발 도구 유틸리티로 그대로이 복사 할 수있다 그것은) : 내가 생각
{
"docs": [
{
"error": {
"root_cause": [
{
"type": "exception",
"reason": "java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: field [message.message.group1] doesn't exist",
"header": {
"processor_type": "rename"
}
}
],
"type": "exception",
"reason": "java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: field [message.message.group1] doesn't exist",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "java.lang.IllegalArgumentException: field [message.message.group1] doesn't exist",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "field [message.message.group1] doesn't exist"
}
},
"header": {
"processor_type": "rename"
}
}
}
]
}
:
POST _ingest/pipeline/_simulate
{
"pipeline" : {
"description": "rename nested fields to remove dot",
"processors": [
{
"rename" : {
"field" : "message.message.group1",
"target_field" : "message_group1"
}
},
{
"rename" : {
"field" : "message.message.group2",
"target_field" : "message.message_group2"
}
}
]
},
"docs":[
{
"_type": "status",
"_id": "1509533940000-m1-bfd7183bf036bd346a0bcf2540c05a70fbc4d69e",
"_version": 5,
"_score": null,
"_source": {
"message": {
"_job-id": "AV8wHJEaa4J0sFOfcZI5",
"message.group1": 0,
"message.group2": "foo"
},
"timestamp": 1509533940000
}
}
]
}
문제는 내 파이프 라인을 사용하려고 할 때 오류가 발생하는 것입니다 문제는 "message.group1"필드가 다른 필드 ("message") 안에 있음으로 인해 발생합니다. 프로세서의 컨텍스트에서 원하는 필드를 참조하는 방법을 잘 모르겠습니다. 중첩 된 필드, 점을 포함하는 필드 및 점을 포함하는 중첩 된 필드 사이의 모호성이있을 수 있습니다.
이 필드를 참조하는 올바른 방법을 찾고 있습니다. 또는 Elasticsearch에서 원하는 것을 수행 할 수없는 경우이를 확인할 수 없습니다. Elasticsearch가이 작업을 수행 할 수 있다면 매우 빠를 것입니다. 그렇지 않으면 문서를 가져 와서 변환하고 새 색인에 다시 저장하는 외부 스크립트를 작성해야합니다.
다음과 비슷한 비슷한 이야기가 있습니다. https://stackoverflow.com/questions/36774110/replacing-a-dot-in-an-field-name – Mnebuerquo