可能会忽略lucene文档提升? [英] possible to ignore lucene document boost?

查看:54
本文介绍了可能会忽略lucene文档提升?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种方法来告诉Lucene搜索者忽略某些查询中的文档增强功能?

I am looking for a way to tell the lucene searcher to ignore document boosting on certain queries?

在我们的搜索结果中,我们通常使用在索引时通过文档的年龄计算出的主导提升因子(索引每晚重建).

In our search results we usually work with a dominant boost-factor calculated by the age of a document while indexing (the index is rebuild nightly).

现在,我正在寻找一种提供搜索功能的方法,该方法可以忽略使用期限,但是找不到覆盖/忽略文档提升的方法.

Now, I am looking for a way offer search-functionality which ignores the age, but found yet no way to override/ignore the document boost.

最诚挚的问候,

亚历克斯

推荐答案

您可以将计算的分数存储为 boost ,而不是将计算的分数存储为新字段,并通过实现 CustomScoreQuery + CustomScoreProvider ,您可以控制要返回哪个值(默认分数或该字段中的计算所得)

Instead of storing your calculated-score as boost, you can store it in a new field, and by implementing CustomScoreQuery + CustomScoreProvider you can control which value(default score or your calculated-one in the field) to return

这篇关于可能会忽略lucene文档提升?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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