<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Limit 1000 fields while persisting with elasticsearch</title><link>https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch</link><description>&lt;p&gt;Hi guys,&lt;/p&gt;
&lt;p&gt;Recently we got into some problem while trying to save an object with more than 1000 fields. I saw that it was reported to ivy.team and the bug is in progress. &lt;/p&gt;
&lt;p&gt;But may I ask if there is any work around for the moment? or will not take another migration?&lt;/p&gt;
&lt;p&gt;Thank you very much&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Caused by: ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.ElasticsearchException: Elasticsearch update index of document failed because of: {"root_cause":[{"type":"illegal_argument_exception","reason":"Limit of total fields [1000] in index [ivy.businessdata-ch.axonivy.finform.deskpost.individualdossier] has been exceeded"}],"type":"illegal_argument_exception","reason":"Limit of total fields [1000] in index [ivy.businessdata-ch.axonivy.finform.deskpost.individualdossier] has been exceeded"}&lt;/code&gt;&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 18 Apr 2018 02:41:26 -0400</lastBuildDate><item><title>Comment by ToanLC on Alex Suter's answer</title><link>https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch#3208</link><description>&lt;p&gt;oh, that's why. Thanks for the explanation, I will stick to the template solution then. :D
BTW, Can I ask how can I set elasticsearch to start on a specific port? I changed the &lt;code&gt;http.port&lt;/code&gt; inside &lt;code&gt;elasticsearch.yml&lt;/code&gt;, but it doesn't work&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ToanLC</dc:creator><pubDate>Wed, 18 Apr 2018 02:41:26 -0400</pubDate><guid>https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch#3208</guid></item><item><title>Comment by Alex Suter on Alex Suter's answer</title><link>https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch#3207</link><description>&lt;p&gt;Yes you are right. But the problem is, if we (ivy itself) reindex, your indrx will be deleted and you will loos this setting. If you use an template, then newly created indicies will alwasy have this setting. We work on a solution for that!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alex Suter</dc:creator><pubDate>Wed, 18 Apr 2018 02:02:29 -0400</pubDate><guid>https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch#3207</guid></item><item><title>Comment by ToanLC on Alex Suter's answer</title><link>https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch#3206</link><description>&lt;p&gt;Hello &lt;a href="https://answers.axonivy.com/users/710/alex-suter"&gt;&lt;a href="https://answers.axonivy.com/users/710/alex-suter"&gt;@alex&lt;/a&gt;&lt;/a&gt;, 
I'm so sorry for the confusion as I actually worked on another instance of elasticsearch of other ivy engine(Mine was at 19201) and I changed the settings on 19200. 
By the way, there is also other way to do this as to change setting of the designated index
&lt;code&gt;curl -XPUT  &lt;a href="http://localhost:19200/ivy.businessdata-ch.axonivy.fintech.individualch.individualdossier/_settings"&gt;http://localhost:19200/ivy.businessdata-ch.axonivy.fintech.individualch.individualdossier/_settings&lt;/a&gt; -d '{"index.mapping.total_fields.limit": 20000}'&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ToanLC</dc:creator><pubDate>Tue, 17 Apr 2018 22:43:39 -0400</pubDate><guid>https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch#3206</guid></item><item><title>Comment by Alex Suter on Alex Suter's answer</title><link>https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch#3201</link><description>&lt;p&gt;you must restart the engine.
1) Delete Index
2) Start engine&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alex Suter</dc:creator><pubDate>Tue, 17 Apr 2018 07:37:28 -0400</pubDate><guid>https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch#3201</guid></item><item><title>Comment by ToanLC on Alex Suter's answer</title><link>https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch#3200</link><description>&lt;p&gt;I tried but then I cannot create the index again as it got into the exception while trying to persist data.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ToanLC</dc:creator><pubDate>Tue, 17 Apr 2018 06:41:12 -0400</pubDate><guid>https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch#3200</guid></item><item><title>Comment by Alex Suter on Alex Suter's answer</title><link>https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch#3199</link><description>&lt;p&gt;it looks good, but you need to recreate the index. the best way is to shutdown the engine, delete the index manually and start the engine again.
i recommend to check the settings of the index. there you can see if your template settings are really applied.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alex Suter</dc:creator><pubDate>Tue, 17 Apr 2018 04:04:12 -0400</pubDate><guid>https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch#3199</guid></item><item><title>Comment by ToanLC on Alex Suter's answer</title><link>https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch#3198</link><description>&lt;p&gt;Hello &lt;a href="https://answers.axonivy.com/users/710/alex-suter"&gt;&lt;a href="https://answers.axonivy.com/users/710/alex-suter"&gt;@alex&lt;/a&gt;&lt;/a&gt;,
I inserted the template onto my elasticsearch server but it didn't help. Not really sure if I did something wrong here.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;a href="https://codebeautify.org/jsonviewer/cbb1a15d"&gt;https://codebeautify.org/jsonviewer/cbb1a15d&lt;/a&gt;&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ToanLC</dc:creator><pubDate>Tue, 17 Apr 2018 03:59:32 -0400</pubDate><guid>https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch#3198</guid></item><item><title>Answer by Alex Suter</title><link>https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch/3195</link><description>&lt;p&gt;Hi &lt;a href="https://answers.axonivy.com/users/559/toanlc"&gt;&lt;a href="https://answers.axonivy.com/users/559/toanlc"&gt;@ToanLC&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can manually create an index template which allows over 1000 fields. When elasticsearch creates the index, it takes all matching index templates and creates the index.&lt;/p&gt;
&lt;p&gt;Afterwards you must recreate the index over the api. Here an index template example.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; "fix_totat_fields" : {
    "order" : 0,
    "version" : 1,
    "template" : "ivy.businessdata*",
    "settings" : {
      "index" : {
        "mapping" : {
          "total_fields" : {
            "limit" : "10000"
          }
        }
      }
    },
    "mappings" : { },
    "aliases" : { } 
}
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alex Suter</dc:creator><pubDate>Tue, 17 Apr 2018 03:05:00 -0400</pubDate><guid>https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch/3195</guid></item></channel></rss>