저는 현재 Udemy에서 ElasticSearch 과정을 진행하고 있습니다.하지만 비디오에서 ElasticSearch 5에 대해 이야기하고 있으며 현재 ElasticSearch 6을 사용 중입니다. 부모/새 형식의 하위 관계. 비디오에서 ElasticSearch 6에서 부모와 자녀 관계를 만드는 데 문제가 있습니다.
각각 즉Films
(
Star Wars
및
The Jedi Returns
와 을 설정하는 것입니다
지도 교사를 않습니다 다음.
curl -H "Content-Type: application/json" -XPUT "127.0.0.1:9200/series" -d '
{
"mappings": {
"franchise": {},
"film": {
"_parent": {
"type": "franchise"
}
}
}
}'
를 나는 내가 얻을 매핑을 추가하려고하지만 경우 다음 오류 :
➜ Downloads curl -H "Content-Type: application/json" -XPUT "127.0.0.1:9200/series?pretty" -d '
{
"mappings": {
"franchise": {},
"film": {
"_parent": {
"type": "franchise"
}
}
}
}'
{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "Rejecting mapping update to [series] as the final mapping would have more than 1 type: [franchise, film]"
}
],
"type" : "illegal_argument_exception",
"reason" : "Rejecting mapping update to [series] as the final mapping would have more than 1 type: [franchise, film]"
},
"status" : 400
}
나는 다음과 같은 리소스를 기반으로 여러 가지를 시도하지만 soluton 찾을 수 없어 : https://www.elastic.co/blog/index-type-parent-child-join-now-future-in-elasticsearch https://www.elastic.co/guide/en/elasticsearch/reference/master/parent-join.html https://github.com/elastic/elasticsearch/issues/20257
TLDR : 누군가가 나를에서 부모 - 자식 관계를 번역에 도움을 주실를 ElasticSearch 6에서 ElastiSearch 5를 올바른 방법으로 사용 하시겠습니까?
다음 단계 (검증) : 매핑이 작동하는지 검증이 볼 때, 교사는 다음 한 다음
그는 얻는 다음 JSON 데이터 :
wget을 http://media.sundog-soft.com/es/series.json
JSON 파일에서추출 :
{ "create" : { "_index" : "series", "_type" : "franchise", "_id" : "1"} }
{ "id": "1", "title" : "Star Wars" }
{ "create" : { "_index" : "series", "_type" : "film", "_id" : "260", "parent" : "1" } }
{ "id": "260", "title" : "Star Wars: Episode IV - A New Hope", "year":"1977" , "genre":["Action", "Adventure", "Sci-Fi"] }
와 B
컬 -H "콘텐츠 형식 : 응용 프로그램/JSON"다음을 수행하여 ULK 수입 데이터를 -XPUT "127.0.0.1:9200/_bulk?pretty"--data-진 @의 series.json
대량으로 데이터를 가져 오기 전에 매핑을 사용하여 인덱스를 정의하고 초기화 했습니까? 그렇지 않은 경우 시도해보십시오. –
죄송합니다. 게시물이 약간 잘못 될 수도 있습니다. 매핑을 시도 할 때 문제가 발생합니다. 그게 제가 도움이 필요한 것입니다. 따라서 가로줄이 끊어지기 전까지 교사가하는 일을 설명하고, 아래에 매핑을 시도 할 때 오류가 발생합니다 (나는 일괄 업로드까지받지 못합니다 - 게시물에서 제거 할 것입니다). – 8bithero