Elastica,KNP Paginator和Resultset> 10000

时间:2018-05-15 14:06:40

标签: symfony elastica foselasticabundle knppaginator

即使对于大型结果,分页也能正常工作。它甚至表明查询有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没有运气,结果窗口大小不会改变。

可能出现什么问题?

1 个答案:

答案 0 :(得分:0)

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

我将此添加到Elastica配置:

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

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