Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
基于另一个索引的Elasticsearch order镶嵌面_Search_Indexing_<img Src="//i.stack.imgur.com/RUiNP.png" Height="16" Width="18" Alt="" Class="sponsor Tag Img">elasticsearch_Facet_Faceted Search - Fatal编程技术网 elasticsearch,facet,faceted-search,Search,Indexing,elasticsearch,Facet,Faceted Search" /> elasticsearch,facet,faceted-search,Search,Indexing,elasticsearch,Facet,Faceted Search" />

基于另一个索引的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正在被弃用,我应该更新我的代码以使用聚合