Has_parent empty

Hello, i'm having problems with the parent-child relation. I did both post/put and got a ack true back.

PUT /capsules/collections/vBDpjJTuspSLkZjeT?parent=S7iubdumqyfLKdLBK
{
"userId": "vgcbygqqebq5LtZtc",
"capsuleId": "S7iubdumqyfLKdLBK",
"capsuleQty": 1,
"id": "vBDpjJTuspSLkZjeT"
}

PUT /capsules/capsules/S7iubdumqyfLKdLBK?routing=S7iubdumqyfLKdLBK
{
"type": "GENERIC",
"number": "871",
"addition": "e",
"value": 1,
"description": "Champagne",
"inOwnerCollection": true,
"quantity": 1,
"ownerId": "vgcbygqqebq5LtZtc",
"approvalState": "APPROVED",
"createdAt": "2016-11-01T06:38:04.789Z",
"imagePath": "/uploads/capsules/S7iubdumqyfLKdLBK/capsule_image.jpg",
"_number": 871,
"id": "S7iubdumqyfLKdLBK",
"farmerId":null
}

When doing a must not of has-parent i got this, parent is set but has parent didn't found it.
"hits": {
"total": 11700,
"max_score": null,
"hits": [
{
"_index": "capsules",
"_type": "collections",
"_id": "vBDpjJTuspSLkZjeT",
"_score": null,
"_routing": "vBDpjJTuspSLkZjeT",
"_parent": "S7iubdumqyfLKdLBK",
"_source": {
"userId": "vgcbygqqebq5LtZtc",
"capsuleId": "S7iubdumqyfLKdLBK",
"capsuleQty": 1,
"id": "vBDpjJTuspSLkZjeT",
"value": null
},
"sort": [
null
]
},

Alspo my mapping and settings:
{
"capsules": {
"aliases": {},
"mappings": {
"capsules": {
"_parent": {
"type": "farmers"
},
"_routing": {
"required": true
},
"properties": {
"_farmerName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"_number": {
"type": "long",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"addition": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"approvalState": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"createdAt": {
"type": "date",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"description": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"farmerId": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"farmerName": {
"type": "text"
},
"id": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"imagePath": {
"type": "text"
},
"inOwnerCollection": {
"type": "boolean"
},
"number": {
"type": "text"
},
"ownerId": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"quantity": {
"type": "long"
},
"tradeValue": {
"type": "float"
},
"type": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"value": {
"type": "long"
}
}
},
"farmers": {
"properties": {
"capsuleCount": {
"type": "long",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"createdAt": {
"type": "date"
},
"id": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"owner": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
}
}
},
"collections": {
"_parent": {
"type": "capsules"
},
"_routing": {
"required": true
},
"properties": {
"capsuleId": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"capsuleQty": {
"type": "long",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"id": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"userId": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
}
}
}
},
"settings": {
"index": {
"creation_date": "1496039760268",
"number_of_shards": "5",
"number_of_replicas": "1",
"uuid": "uTDUnIiARbyMnld4HF9srw",
"version": {
"created": "5010199"
},
"provided_name": "capsules"
}
}
}
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.