프로젝트에서 사용할 인덱스의 매핑을 만듭니다. 기능의 도메인이 주어지면 대부분의 필드를 대소 문자를 구별하지 않는 용어 쿼리를 통해 검색 할 수있게하고 싶습니다. 사용자 정의 분석기 (여기에 제안 된 것과 같은 : Elasticsearch Map case insensitive to not_analyzed documents)를 사용해 보았지만 문서를 색인하려고하면 시간 초과가 발생하여 전체 프로세스가 실패 할 때까지 프로세스가 60 초 동안 중단됩니다. 센스에서 테스트 할 때도 동일한 동작이 나타납니다. 나는 다른 이름을 사용하고 두 가지의 각각에 대한 기본 분석기로 정의하려고하면 (당신이 볼 수 있듯이, 나는 "기본"으로 분석기를 정의사용자 지정 분석기로 문서를 인덱싱 할 때 시간 초과가 발생했습니다.
put /emails
{
"mappings": {
"email": {
"properties": {
"createdOn": {
"type": "date",
"store": true,
"format": "strict_date_optional_time||epoch_millis"
},
"data": {
"type": "object",
"dynamic": "true"
},
"from": {
"type": "string",
"store": true
},
"id": {
"type": "string",
"store": true
},
"sentOn": {
"type": "date",
"store": true,
"format": "strict_date_optional_time||epoch_millis"
},
"sesId": {
"type": "string",
"store": true
},
"subject": {
"type": "string",
"store": true,
"analyzer": "standard"
},
"templates": {
"properties": {
"html": {
"type": "string",
"store": true
},
"plainText": {
"type": "string",
"store": true
}
}
},
"to": {
"type": "string",
"store": true
},
"type": {
"type": "string",
"store": true
}
}
},
"event": {
"_parent": {
"type": "email"
},
"properties": {
"id": {
"type": "string",
"store": true
},
"origin": {
"type": "string",
"store": true
},
"time": {
"type": "date",
"store": true,
"format": "strict_date_optional_time||epoch_millis"
},
"type": {
"type": "string",
"store": true
},
"userAgent": {
"type": "string",
"store": true
}
}
}
},
"settings": {
"number_of_shards": "5",
"number_of_replicas": "0",
"analysis": {
"analyzer": {
"default": {
"tokenizer": "keyword",
"filter": [
"lowercase"
],
"type": "custom"
}
}
}
}
}
: 여기
인덱스 정의입니다 유형, 나는"Root mapping definition has unsupported parameters: [analyzer : my_analyzer]"
오류가 발생합니다).
그리고이 날이 타임 아웃이 일어나고있는 이유를 정말 이해할 수없는 인덱스
post /emails/email/1
{
"from": "email-address-1",
"to": "email-address-2",
"subject": "Hello world",
"data":{
"status": "SENT"
}
}
에 문서를 추가하기 위해 노력하고있다. C# 콘솔 응용 프로그램을 통해 NEST를 사용해 보았습니다. 같은 행동.
감사합니다.
추 신 : 테스트 용 AWS에서 호스트하는 Elasticsearch 2.3과 로컬 도커 컨테이너에서 호스트하는 Elasticsearch 2.3을 모두 사용하고 있습니다.
개발 단계에서 5 복제본을 만들만한 충분한 노드가 클러스터에 있습니까? –
단일 노드에 의해 일시적으로 만들어진 go-to-production 클러스터입니다. 새로운 클러스터를 만들면 빈 상태가 될 수 있습니다. – Kralizek
나는 그것이 5 개의 파편과 1 개의 복제품이어야한다고 생각한다. 개발하는 동안 복제본을 0으로 설정 한 다음 프로덕션으로 이동하기 전에 복제본을 업데이트 할 수 있습니다. –