基于另一个索引的Elasticsearch order镶嵌面
我不确定用哪个词来描述这个问题,所以我将用一个简单的例子 我有博客文章索引,每个都有未分析的标签字段:基于另一个索引的Elasticsearch order镶嵌面,search,indexing,elasticsearch,facet,faceted-search,Search,Indexing,elasticsearch,Facet,Faceted Search,我不确定用哪个词来描述这个问题,所以我将用一个简单的例子 我有博客文章索引,每个都有未分析的标签字段: { id: 1 tags: ['a'] }, { id: 2 tags: ['a', 'b'] }, { id: 3 tags: ['a', 'b', 'c'] } 如果我运行search for tag:c,我成功地在标签上获得了3个post结果和方面: { term: 'a', count: 3 }, { term: 'b', count: 2 }
{
id: 1
tags: ['a']
},
{
id: 2
tags: ['a', 'b']
},
{
id: 3
tags: ['a', 'b', 'c']
}
如果我运行search for tag:c,我成功地在标签上获得了3个post结果和方面:
{
term: 'a',
count: 3
},
{
term: 'b',
count: 2
}
在上面的结果中,面是按计数排序的。我的问题是,是否有可能提高从另一个指数计算出的价值?如果我有一个任意分数标签的索引
{
tag: 'a',
score: 0
},
{
tag: 'b',
score: 10
},
{
tag: 'c',
score: 0
},
从另一个指数计算的分数是否可以实现以下方面
{
tag: 'b'
score: 12 //10 + 2, where 2 is the count
},
{
tag: 'b'
score: 3 //0 + 3, where 3 is the count
}
*我知道facet正在被弃用,我应该更新我的代码以使用聚合