1
elasticsearchに親子関係船を実装しました。親タイプ名はparticipant_tests
で、その子タイプ名はparticipant_test_question_answers
です。親タイプの検索条件はいくつかあります:親文書を検索するElasticSearchクエリ
query": {
"bool":{
"should":[
{
"range":{
"created_at":{
"gte":"2016-01-01",
"lte":"2016-05-11",
"format":"YYYY-MM-dd"
}
}
},
{
"terms":{
"created_by.id":["1000001"]
}
},
{
"multi_match":{
"query":"test human time",
"fields":[
"course_tests.course_id.course_no",
"participant_test_questions.answer_text",
"participants.first_name",
"participants.last_name",
"participants.promote_unique_user_id","result"
],
"operator":"OR"
}
}
]
}
}
問合せの戻り結果の上
が、私はhas_child
を確認したい場合は何も結果が返されません。 bool
クラスの後にこの行を追加しました。
"has_child": {
"type": "participant_test_question_answers",
"min_children": 1,
"query": {
"match_all": {}
}
}
あなたが使用し、完全なクエリは何ですか? –