【问题标题】:Elastica, KNP Paginator and Resultset > 10000Elastica、KNP 分页器和结果集 > 10000
【发布时间】:2018-10-25 09:56:07
【问题描述】:

即使对于大型结果,分页也能正常工作。它甚至显示查询有 25k 个结果。分页适用于前 10000 个条目。但是,如果我想显示条目 10000 - 10010(例如),一切都会因此错误而中断:

Uncaught PHP Exception Elastica\Exception\ResponseException: "Result window is too large, from + size must be less than or equal to: [10000] but was [24240].

我正在使用friendsofsymfony/elastica-bundle。我试过设置 max_result_window 没有运气,结果窗口大小没有改变。

可能出了什么问题?

【问题讨论】:

    标签: symfony elastica foselasticabundle knppaginator


    【解决方案1】:

    这是我的错,您必须重置索引,以便对 max_result_window 进行更改!

    我将此添加到 Elastica 配置中:

    fos_elastica:
        indexes:
            app:
              settings:
                index:
                  max_result_window: 50000
    

    更改配置后重置索引,而不是填充它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-07-22
      • 1970-01-01
      • 2010-12-31
      • 1970-01-01
      • 2019-03-19
      相关资源
      最近更新 更多