在我的弹性搜索服务器中,我有一个 index http://localhost:9200/blog
。
(博客)索引包含多种类型。
例如:http://localhost:9200/blog/posts
, http://localhost:9200/blog/tags
.
在标签类型中,我创建了超过 1000 个标签和在帖子类型中创建的 10 个帖子。
例如:帖子
{
"_index":"blog",
"_type":"posts",
"_id":"1",
"_version":3,
"found":true,
"_source" : {
"catalogId" : "1",
"name" : "cricket",
"url" : "http://www.wikipedia/cricket"
}
}
例如:标签
{
"_index":"blog",
"_type":"tags",
"_id":"1",
"_version":3,
"found":true,
"_source" : {
"tagId" : "1",
"name" : "game"
}
}
我想将现有标签分配给博客文章(即关系 => 映射)。
如何将标签分配给帖子映射?