CF10 Fieldboost对cfindex没有影响 [英] CF10 Fieldboost on cfindex has no effect

查看:309
本文介绍了CF10 Fieldboost对cfindex没有影响的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

也许这是一个新的,大多数未使用的功能,但我试图创建一个基于查询从我们的数据库的集合。这是一个简单的Q& A,我想排名的问题比问题的答案高。似乎是目前搜索注册类的问题如何注册类的排名低于如何为我的课程购买图书,因为书籍中的内容答案我猜比赛更好。

Maybe this is a new, mostly unused feature, but I am trying to create a collection based on a query from our DB. It's a simple Q&A and I'd like to rank the matches in the question higher than the answer. Seems logical as currently a search for "register for classes" the question "How do I register for classes" ranks lower than "How to I purchase books for my classes" because content in the books answers I guess matches better. So I'd like to bump the Q&A's if the question matches really well to the text in the query.

CF10在cfindex上有一个Fieldboost字段,但是如果问题与查询中的文本匹配的话,我想碰撞Q&这对结果有0影响。我添加它,删除它,没有任何更改。

CF10 has a "Fieldboost" field on the cfindex however this is having 0 effect on results. I add it and remove it and nothing changes. The score and rank stays the exact same.

<cfindex action="refresh" collection="faq" 
      type="custom" 
      title="question" 
      body="question,answer" 
      fieldboost="question:6" 
      key="faq_id" 
      query="updateQuery" 
      location_i="location_id" />

`

推荐答案

根据 Solr文档,任何要提升的字段必须具有 omitNorms =false。默认是 false ,但是它可能被设置为 true 在您的schema.xml中?我在上面的CFINDEX语句中看到的另一个问题是,您没有在 fieldboost 参数中指定字段名,而是一个查询列。如果你想提高 title ,那么也许你需要

According to the Solr documentation any field that is to be boosted must have omitNorms="false" in schema.xml. The default is false but is it possible it is being set to true in your schema.xml? The other issue I see in the above CFINDEX statement is that you're not specifying a field name in your fieldboost parameter, but rather a query column. If you want to boost on title then perhaps you need

<cfindex ... fieldboost="title:6" ... />

这篇关于CF10 Fieldboost对cfindex没有影响的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆