<i id='Kth78'><tr id='Kth78'><dt id='Kth78'><q id='Kth78'><span id='Kth78'><b id='Kth78'><form id='Kth78'><ins id='Kth78'></ins><ul id='Kth78'></ul><sub id='Kth78'></sub></form><legend id='Kth78'></legend><bdo id='Kth78'><pre id='Kth78'><center id='Kth78'></center></pre></bdo></b><th id='Kth78'></th></span></q></dt></tr></i><div id='Kth78'><tfoot id='Kth78'></tfoot><dl id='Kth78'><fieldset id='Kth78'></fieldset></dl></div>

<small id='Kth78'></small><noframes id='Kth78'>

    • <bdo id='Kth78'></bdo><ul id='Kth78'></ul>

  1. <legend id='Kth78'><style id='Kth78'><dir id='Kth78'><q id='Kth78'></q></dir></style></legend>

    1. <tfoot id='Kth78'></tfoot>

      Solr:如何动态提升有限数量的文档?QueryElevationCo

      时间:2023-09-29
        <legend id='AjmNn'><style id='AjmNn'><dir id='AjmNn'><q id='AjmNn'></q></dir></style></legend>

              <tbody id='AjmNn'></tbody>

            <small id='AjmNn'></small><noframes id='AjmNn'>

          1. <tfoot id='AjmNn'></tfoot>
              <bdo id='AjmNn'></bdo><ul id='AjmNn'></ul>
                <i id='AjmNn'><tr id='AjmNn'><dt id='AjmNn'><q id='AjmNn'><span id='AjmNn'><b id='AjmNn'><form id='AjmNn'><ins id='AjmNn'></ins><ul id='AjmNn'></ul><sub id='AjmNn'></sub></form><legend id='AjmNn'></legend><bdo id='AjmNn'><pre id='AjmNn'><center id='AjmNn'></center></pre></bdo></b><th id='AjmNn'></th></span></q></dt></tr></i><div id='AjmNn'><tfoot id='AjmNn'></tfoot><dl id='AjmNn'><fieldset id='AjmNn'></fieldset></dl></div>

              • 本文介绍了Solr:如何动态提升有限数量的文档?QueryElevationComponent 是否需要修改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我的要求是针对用户请求提升有限数量(例如五个)文档.

                my requirement is to elevate a limited number of (e.g. five) documents for a user request.

                我得到的是一个单独的文档字段,它存储了一个类似于表示电梯排名值的提升值的数值.

                What I've got is a single document field which stores a numerical value similar to a boosting value which represents an elevator ranking value.

                因此,用户查询将返回电梯排名值最高的 5 个文档,其余文档按常规顺序填充页面.

                So a user query would return 5 documents with the highest elevator ranking value and the remaining documents to fill a page in regular order.

                怎么做?

                QueryElevationComponent 只允许static 查询定义.提升不允许提升特殊电梯排名字段的有限数量文档.

                The QueryElevationComponent does only allow static query definitions. Boosting does not allow to boost a limited number of documents for the special elevator ranking field.

                我必须编写修改后的 QueryElevationComponent 吗?如果是,有没有好的示例如何做到这一点?

                Do I have to write a modified QueryElevationComponent? If yes, are there good examples how to do that?

                或者是否存在另一种方法,我没有赶上?

                Or does another approach exists, I didnt catched up?

                感谢您的任何提示或想法!

                Thank you for any hints or ideas!

                推荐答案

                使用两个单独的请求找到了解决方案.

                Found a solution using two separate requests.

                首先按该分数字段提升文档.使用分页来限制结果.从结果页面中获取唯一的文档 ID,并在新请求中显式提升这些 ID.

                First boost documents by that score field. Use pagination to limit the result. Take the unique document ids from the result page and boost these ones explicitly within a new request.

                这篇关于Solr:如何动态提升有限数量的文档?QueryElevationComponent 是否需要修改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:如何对 Solr 中的多个字段执行嵌套聚合? 下一篇:Lucene JDBC 目录

                相关文章

                最新文章

                <i id='U5k8V'><tr id='U5k8V'><dt id='U5k8V'><q id='U5k8V'><span id='U5k8V'><b id='U5k8V'><form id='U5k8V'><ins id='U5k8V'></ins><ul id='U5k8V'></ul><sub id='U5k8V'></sub></form><legend id='U5k8V'></legend><bdo id='U5k8V'><pre id='U5k8V'><center id='U5k8V'></center></pre></bdo></b><th id='U5k8V'></th></span></q></dt></tr></i><div id='U5k8V'><tfoot id='U5k8V'></tfoot><dl id='U5k8V'><fieldset id='U5k8V'></fieldset></dl></div>
                1. <tfoot id='U5k8V'></tfoot>

                  1. <legend id='U5k8V'><style id='U5k8V'><dir id='U5k8V'><q id='U5k8V'></q></dir></style></legend>
                      <bdo id='U5k8V'></bdo><ul id='U5k8V'></ul>

                    <small id='U5k8V'></small><noframes id='U5k8V'>