0
子タイプの検索から親のフィールドを取得する:ElasticSearch:私はこのような2種類(親/子関係)とインデックスを持って
{
"myindex": {
"mappings": {
"b": {
"_parent": {
"type": "a"
},
"properties": {
"b_propertie1": {
"type": "string",
"analyzer": "keyword_analyzer"
},
"b_propertie2": {
"type": "string",
"analyzer": "keyword_analyzer"
}
}
},
"a": {
"properties": {
"a_propertie1": {
"type": "string",
"analyzer": "keyword_analyzer"
},
"a_propertie2": {
"type": "string",
"analyzer": "keyword_analyzer"
}
}
}
}
}
}
と私はのフィールドを返すクエリを作成したいです親と子供
POST /myindex/b/_search
{
"fields" : ["b_propertie1", "b_propertie2", "a_propertie1", "a_propertie2"],
"query": {
"match": {
"b_propertie1": "SOMETHING"
}
}
}
これを行う方法はありますか?そしてどうやって?
ありがとうございます。
素晴らしい、それは働く:)ありがとう –