InitIndex: Allow to configure index.maxLimit for Elasticsearch
When using the Elasticsearch secondary index, `index.maxLimit` should not exceed the value of `index.max_result_window` configured on the Elasticsearch server. By default `index.maxLimit` is not set, which effectively means that the value used is Integer.MAX_VALUE. When Elasticsearch is used out of the box the default `index.max_result_window` is 10000, and this results in query failures: "Result window is too large, from + size must be less than or equal to: [10000] but was [2147483647]." When the index type is Elasticsearch, prompt for the max limit during initialization, defaulting to Elasticsearch's default value of 10000. Bug: Issue 8527 Change-Id: I983a83b5cdd0eaf5ba875c3310dfd484e53fe064
This commit is contained in:
parent
12c5d17867
commit
52c2b4afe0
|
@ -2689,9 +2689,10 @@ result lists). Set to 0 for no limit.
|
|||
+
|
||||
When `index.type` is set to `ELASTICSEARCH`, this value should not exceed
|
||||
the `index.max_result_window` value configured on the Elasticsearch
|
||||
server.
|
||||
server. If a value is not configured during site initialization, defaults to
|
||||
10000, which is the default value of `index.max_result_window` in Elasticsearch.
|
||||
+
|
||||
Defaults to no limit.
|
||||
When `index.type` is set to `LUCENE`, defaults to no limit.
|
||||
|
||||
[[index.maxPages]]index.maxPages::
|
||||
+
|
||||
|
|
|
@ -70,6 +70,7 @@ class InitIndex implements InitStep {
|
|||
"Transport protocol", "protocol", "http", Sets.newHashSet("http", "https"));
|
||||
defaultServer.string("Hostname", "hostname", "localhost");
|
||||
defaultServer.string("Port", "port", "9200");
|
||||
index.string("Result window size", "maxLimit", "10000");
|
||||
}
|
||||
|
||||
if ((site.isNew || isEmptySite()) && type == IndexType.LUCENE) {
|
||||
|
|
Loading…
Reference in New Issue