<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How do I change Elastic Search setting index.max_result_window?</title><link>https://answers.axonivy.com/questions/3696/how-do-i-change-elastic-search-setting-index-max_result_window</link><description>&lt;p&gt;For a migration, I need to work with a large set of Elastic Search objects. Setting the limit to 100000, I get the following error:&lt;/p&gt;
&lt;p&gt;ElasticsearchException: Elasticsearch search documents failed because of: {"root_cause":[{"type":"query_phase_execution_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [100000]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting."}],...&lt;/p&gt;
&lt;p&gt;How can the &lt;strong&gt;index.max_result_window&lt;/strong&gt; setting be changed. Or - alternatively, how do I access the scroll API?&lt;/p&gt;
&lt;p&gt;Designer 7.2.1&lt;/p&gt;
&lt;p&gt;TIA
Peter&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/3696/how-do-i-change-elastic-search-setting-index-max_result_window" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 27 Feb 2019 08:53:05 -0500</lastBuildDate><item><title>Answer by Alex Suter</title><link>https://answers.axonivy.com/questions/3696/how-do-i-change-elastic-search-setting-index-max_result_window/3715</link><description>&lt;p&gt;This is a limitation of the &lt;code&gt;BusinessDataRepository&lt;/code&gt; API. A query like the following will never work with the default elasticsearch index settings:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Ivy.repo().search(Data.class).limit(10000, 1000).execute().getAll();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;There are two possibilities:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Make some filter condition in your query for your migration now. Query only the first 10000 which are not already migrated. After that you can fire the same query and you will get the next 10000 business data objects.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change the &lt;code&gt;max_result_window&lt;/code&gt; size of the index. But the problem is, that the customization of the index is not supported by ivy and must be done manually. &lt;a href="https://stackoverflow.com/questions/35206409/elasticsearch-2-1-result-window-is-too-large-index-max-result-window"&gt;https://stackoverflow.com/questions/35206409/elasticsearch-2-1-result-window-is-too-large-index-max-result-window&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The best solution would be that we provide &lt;strong&gt;the scroll api&lt;/strong&gt; for elasticsearch. We'll see how we can make that available.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alex Suter</dc:creator><pubDate>Wed, 27 Feb 2019 08:53:05 -0500</pubDate><guid>https://answers.axonivy.com/questions/3696/how-do-i-change-elastic-search-setting-index-max_result_window/3715</guid></item></channel></rss>