0

在我的 solr 索引中,我有一个具有以下定义的字段标记。

<field name="tags" type="string" indexed="true" stored="true" multiValued="true" />

我已经有了一个预定义的标签列表(a、b、c、d、e),我只想对这些标签进行嵌套分面。

top_tags:{
    type: terms,
    field: tags,
    limit: 5,
    facet:{
        type: terms,
        field: tags,
        limit: 5
    }
  }  

当我在嵌套分面之上应用时,它为我提供了前 5 个标签的嵌套分面输出,而不是为我的预定义标签提供。以下是输出。

"top_tags":{
      "buckets":[{
          "val":"x",
          "count":10,
          "buckets":[
          {
            "val":"x",
            "count":10
          },
          {
                "val":"y",
                "count":5
         }
        ]}},

如何在 json 嵌套分面之上应用过滤逻辑(类似于分面查询)?

4

0 回答 0