<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How to keep new setting of Elasticsearch when restarting Ivy server</title><link>https://answers.axonivy.com/questions/3564/how-to-keep-new-setting-of-elasticsearch-when-restarting-ivy-server</link><description>&lt;p&gt;Hello all,&lt;/p&gt;
&lt;p&gt;Our team want to add new setting to Elasticsearch in order to support to search special characters.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;curl -XPUT &lt;a href="http://localhost:9200/ivy.businessdata-ch.axonivy.fintech.valiant.datamodel.valiantcrdhwaydossier"&gt;http://localhost:9200/ivy.businessdata-ch.axonivy.fintech.valiant.datamodel.valiantcrdhwaydossier&lt;/a&gt; -H 'Content-Type: application/json' -d '{
  "settings": {
    "analysis": {
      "char_filter": {
        "my_char_filter": {
          "type": "mapping",
          "mappings": [
            "â =&amp;gt; a",
            "ê =&amp;gt; e",
            "à =&amp;gt; a",
            "ï =&amp;gt; i",
            "û =&amp;gt; u",
            "é =&amp;gt; e",
            "è =&amp;gt; e",
            "ë =&amp;gt; e",
            "ô =&amp;gt; o",
            "î =&amp;gt; i",
            "ÿ =&amp;gt; y",
            "ù =&amp;gt; u",
            "ç =&amp;gt; c",
            "æ =&amp;gt; ae",
            "œ =&amp;gt; oe",
            "ü =&amp;gt; ue"
          ]
        },
        "number_filter": {
          "type": "mapping",
          "mappings": [
            ". =&amp;gt; ",
            "- =&amp;gt; "
          ]
        }
      },
      "analyzer":....&lt;/code&gt; 
But when restart Ivy server, new setting is gone. We also put new setting to template as this post (&lt;a href="https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch)"&gt;https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch)&lt;/a&gt; with following steps: &lt;/p&gt;
&lt;p&gt;1) Stop Ivy server.
2) Put new setting to template.
3) Restart Ivy server.
But new setting is also lost. &lt;/p&gt;
&lt;p&gt;To pass over this issue, we &lt;strong&gt;MUST delete all data in database of this index&lt;/strong&gt;, then put new setting and restart Ivy server. &lt;/p&gt;
&lt;p&gt;Could you please tell me the way to go over this issue without deleting data? (Because we cannot delete data of customer).&lt;/p&gt;
&lt;p&gt;We are using Ivy7.0.3 and External ElasticSearch 5.5 and Oracle database.&lt;/p&gt;
&lt;p&gt;Thanks,
Tuan&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/3564/how-to-keep-new-setting-of-elasticsearch-when-restarting-ivy-server" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 11 Dec 2018 02:20:12 -0500</lastBuildDate><item><title>Answer by pptuan</title><link>https://answers.axonivy.com/questions/3564/how-to-keep-new-setting-of-elasticsearch-when-restarting-ivy-server/3572</link><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;To keep new setting of Elasticsearch when restarting Ivy server, we have to put new setting to template with 2 important points:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;New template name MUST be different with default template name (Example: &lt;strong&gt;ivy.businessdata-template -&amp;gt; ivy.businessdata-template_updated&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;Order's value MUST be greater than Order default value (&lt;strong&gt;Example: 0 -&amp;gt; 1&lt;/strong&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;curl -XPUT &lt;a href="http://localhost:9200/_template/ivy.businessdata-template_updated"&gt;http://localhost:9200/_template/ivy.businessdata-template_updated&lt;/a&gt; -H 'Content-Type: application/json' -d '{
    "order": 1,
    "template": "ivy.businessdata-*",
    "settings": {
        "analysis": {
          "char_filter": {
            "my_char_filter": {
              "type": "mapping",
              "mappings": [
                "â =&amp;gt; a",
                "ê =&amp;gt; e",
                "à =&amp;gt; a",
                "ï =&amp;gt; i",
                "û =&amp;gt; u",
                "é =&amp;gt; e",
                "è =&amp;gt; e",
                "ë =&amp;gt; e",
                "ô =&amp;gt; o",
                "î =&amp;gt; i",
                "ÿ =&amp;gt; y",
                "ù =&amp;gt; u",
                "ç =&amp;gt; c",
                "æ =&amp;gt; ae",
                "œ =&amp;gt; oe",
                "ü =&amp;gt; ue"
              ]
            },
            "number_filter": {
              "type": "mapping",
              "mappings": [
                ". =&amp;gt; ",
                "- =&amp;gt; "
              ]
            }
          },
          "analyzer": ....&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">pptuan</dc:creator><pubDate>Tue, 11 Dec 2018 02:20:12 -0500</pubDate><guid>https://answers.axonivy.com/questions/3564/how-to-keep-new-setting-of-elasticsearch-when-restarting-ivy-server/3572</guid></item></channel></rss>