Solr:提倡语音变化吗? [英] Solr: Boosting-down phonetic variations?

查看:89
本文介绍了Solr:提倡语音变化吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试按两个字段进行搜索,每个字段都有自己的增强因子,并包含语音变化,但是具有这些变化的结果应始终在结果中排​​名较低.当前的问题是,在助推器较高的情况下,语音变化在场上的结果优于在助推器较低的情况下具有精确匹配结果.

I'm trying to search by two fields, each having its own boost factor, and include phonetic variations, but results with these variations should always be ranked lower in the results. The problem is currently that results with phonetic variation in the field with the higher boost are preferred over results with exact match in the field with lower boost.

在schema.xml中,我有一个名为文本"的字段,其中包含另外两个可搜索字段(通过copyField实现的"title"和"description"),每个字段都有其提升因子(在solrconfig.xml的dismax SearchHandler中定义). 此字段在索引"和查询"分析器上都有一个带有DoubleMetaphone的solr.PhoneticFilterFactory过滤器. 据我了解,每个单词的语音变体都会添加到查询和索引中.

In schema.xml I have a field named "text" containing two other searchable fields ("title" and "description" implemented via copyField), each with its boost factor (defined in a dismax SearchHandler in solrconfig.xml). This field has a solr.PhoneticFilterFactory filter with DoubleMetaphone on both "index" and "query" analyzers. As I understand this, phonetic variations of each word are added to the query and to the index.

我的问题是如何告诉solr为语音变化提供单独的增强因子(例如0.3)?

My question is how can I tell solr to give a separate boost factor (e.g. 0.3) to the phonetic variations?

推荐答案

一种可能的解决方案是再创建两个字段:假设您的原始字段名为"title"和"description".创建"title_phonetic"和"description_phonetic" copy_fields,仅将语音变体添加到这些字段.接下来,使用dismax解析器为这些字段提供不同的提升.

One possible solution is to create two more fields: Suppose your original fields are named "title" and "description". Create "title_phonetic" and "description_phonetic" copy_fields, and only add the phonetic variations to these fields. Next, use the dismax parser to give different boosts to these fields.

这篇关于Solr:提倡语音变化吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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