我在elastic中有两个索引,index_a和index_B,索引a中的示例记录如下所示
"id": "8",
"name": "pepsi",
"id_b": "13",
索引B中的样本记录看起来像
"id": "13",
"mapping": "15"
搜索时,我将从索引a获得名称,例如"pepsi"
。我必须从索引b返回Map字段,即"15"
。我知道这可以通过两个搜索查询轻松完成,其中i返回与来自index_a的输入文本匹配的所有"id_b"
,然后第二个查询将与id_B,并返回Map"15"
。我的问题是这能在一个查询中完成吗?
1条答案
按热度按时间ukxgm1gy1#
我做了这个代码和响应Map值.参考:article .
回复: