【问题标题】:Solr edismax, boosting according to column of documentSolr edismax,根据文档列进行提升
【发布时间】:2014-05-07 15:52:48
【问题描述】:

我有一个包含商店和描述的 solr 数据库。我查询 solr 以获取在 shopTitle 或 shopDescription 中包含特定关键字的商店。 我使用 edismax 将 shopTitle 提升到 shopDescription 之上,这样当我搜索商店名称并找到一个时,无论在另一家商店的描述中可以提到多少次,它总是首先出现。但是,我们也有一个内部排序指标(分数)。我正在寻找的是在文档提升中混合这种内部排名。

即。

shop: Amazon
shopDescription: .... eBay ... mediamarkt ... ikea dishwasher
internalRanking: 250000

shop: eBay
shopDescription: .... amazon ... amazon .... ikea ... dishwasher dishwasher dishwasher
internalRanking: 180000

shop: mediamarkt
shopDescription: .... eBay .... amazon ... amazon ... dishwasher dishwasher
internalRanking: 178000

shop: Ikea
shopDescription: ... eBay ... mediamarkt ...
internalRanking: 175000

shop: dishwasher world
shopDescription: ... dishwasher ... eBay ... mediamarkt
internalRanking: 80000

shop: dishwasher masters
shopDescription: ... dishwasher ... dishwasher ... dishwasher ... dishwasher dishwasher
internalRanking: 100

我正在做的 atm 是:

"params": {
  "pf": "title description",
  "sort": "computed_ranking desc",
  "q": "dishwasher",
  "qf": "title^20 description^0.1",
  "defType": "edismax"
}

这很好用,但不包括 internalRanking。如何在权重计算中推动它,以便

搜索洗碗机应按以下顺序返回商店

dishwasher world (1st because: title contains keyword + highest internal ranking on the shops with title match)
dishwasher masters (2nd because: title contains keyword but has lass internal ranking than dishwasher world)
eBay (3rd because of the description)
mediamarkt (4th because of the description)
Amazon (5th because of the description)

但我想不通...如何将 internalRanking(文档属性/列)与文档权重混合,以便校准订单。

【问题讨论】:

    标签: solr solr4


    【解决方案1】:

    找到解决方案。

    1. 对于我的情况,我应该使用 dismax 而不是 edismax
    2. dismax.bf 是函数。我所要做的就是在那里确定我的属性(内部排名)
    3. 我最大的错误是 myboosting 分数太低了。我的内部排名可以保持高达 100 万的价值。调整我的提升分数终于达到了预期的效果!

    我仍然喜欢 solr :)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-06-23
      • 1970-01-01
      • 2012-06-18
      • 1970-01-01
      • 2014-03-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多