<p dir="auto">I am facing with problem when i need to update synonyms on my index dynamically. Solution is simple close index, update settings, open index. But issue is that if i provide less synonyms, then elastic search will change that items which i provide and leave other<br>
Steps to reproduce:<br>
PUT <a href="http://localhost:9200/test_index/" rel="nofollow">http://localhost:9200/test_index/</a></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;test_index&quot; : {
    &quot;settings&quot; : {
      &quot;index&quot; : {
        &quot;creation_date&quot; : &quot;1417564655756&quot;,
        &quot;analysis&quot; : {
          &quot;filter&quot; : {
            &quot;stemmer&quot; : {
              &quot;type&quot; : &quot;stemmer&quot;,
              &quot;language&quot; : &quot;danish&quot;
            },
            &quot;suggestions_shingle&quot; : {
              &quot;min_shingle_size&quot; : &quot;2&quot;,
              &quot;max_shingle_size&quot; : &quot;5&quot;,
              &quot;type&quot; : &quot;shingle&quot;,
              &quot;filler_token&quot; : &quot;&quot;
            },
            &quot;spellcorrections&quot; : {
              &quot;type&quot; : &quot;synonym&quot;,
              &quot;synonyms&quot; : [ &quot;incorrect1=&gt;correct1&quot;, &quot;otherword=&gt;word2&quot; ],
              &quot;expand&quot; : &quot;false&quot;
            },
            &quot;synonyms&quot; : {
              &quot;type&quot; : &quot;synonym&quot;,
              &quot;expand&quot; : &quot;true&quot;,
              &quot;synonyms&quot; : [ &quot;synonym1, synonym2&quot;, &quot;third, synthird&quot;, &quot;and=&gt;so on&quot; ]
            },
            &quot;stopwords&quot; : {
              &quot;ignore_case&quot; : &quot;true&quot;,
              &quot;enable_position_increments&quot; : &quot;true&quot;,
              &quot;type&quot; : &quot;stop&quot;,
              &quot;stopwords&quot; : [ &quot;_danish_&quot; ]
            }
          },
          &quot;analyzer&quot; : {
            &quot;DidYouMeanAnalyzer&quot; : {
              &quot;filter&quot; : [ &quot;lowercase&quot;, &quot;stopwords&quot;, &quot;synonyms&quot; ],
              &quot;char_filter&quot; : [ &quot;html_strip&quot; ],
              &quot;type&quot; : &quot;custom&quot;,
              &quot;tokenizer&quot; : &quot;standard&quot;
            },
            &quot;suggestions&quot; : {
              &quot;filter&quot; : [ &quot;stopwords&quot;, &quot;lowercase&quot;, &quot;suggestions_shingle&quot;, &quot;trim&quot;, &quot;unique&quot; ],
              &quot;char_filter&quot; : [ &quot;html_strip&quot; ],
              &quot;type&quot; : &quot;custom&quot;,
              &quot;tokenizer&quot; : &quot;standard&quot;
            },
            &quot;default&quot; : {
              &quot;filter&quot; : [ &quot;lowercase&quot;, &quot;spellcorrections&quot;, &quot;synonyms&quot;, &quot;stopwords&quot;, &quot;stemmer&quot; ],
              &quot;char_filter&quot; : [ &quot;html_strip&quot; ],
              &quot;type&quot; : &quot;custom&quot;,
              &quot;tokenizer&quot; : &quot;standard&quot;
            }
          }
        },
        &quot;number_of_shards&quot; : &quot;5&quot;,
        &quot;number_of_replicas&quot; : &quot;0&quot;,
        &quot;version&quot; : {
          &quot;created&quot; : &quot;1040199&quot;
        },
        &quot;uuid&quot; : &quot;1NS67y_4S4qdEEk2_L2r5w&quot;
      }
    }
  }
}"><pre class="notranslate"><span class="pl-kos">{</span>
  <span class="pl-s">"test_index"</span> : <span class="pl-kos">{</span>
    <span class="pl-s">"settings"</span> : <span class="pl-kos">{</span>
      <span class="pl-s">"index"</span> : <span class="pl-kos">{</span>
        <span class="pl-s">"creation_date"</span> : <span class="pl-s">"1417564655756"</span><span class="pl-kos">,</span>
        <span class="pl-s">"analysis"</span> : <span class="pl-kos">{</span>
          <span class="pl-s">"filter"</span> : <span class="pl-kos">{</span>
            <span class="pl-s">"stemmer"</span> : <span class="pl-kos">{</span>
              <span class="pl-s">"type"</span> : <span class="pl-s">"stemmer"</span><span class="pl-kos">,</span>
              <span class="pl-s">"language"</span> : <span class="pl-s">"danish"</span>
            <span class="pl-kos">}</span><span class="pl-kos">,</span>
            <span class="pl-s">"suggestions_shingle"</span> : <span class="pl-kos">{</span>
              <span class="pl-s">"min_shingle_size"</span> : <span class="pl-s">"2"</span><span class="pl-kos">,</span>
              <span class="pl-s">"max_shingle_size"</span> : <span class="pl-s">"5"</span><span class="pl-kos">,</span>
              <span class="pl-s">"type"</span> : <span class="pl-s">"shingle"</span><span class="pl-kos">,</span>
              <span class="pl-s">"filler_token"</span> : <span class="pl-s">""</span>
            <span class="pl-kos">}</span><span class="pl-kos">,</span>
            <span class="pl-s">"spellcorrections"</span> : <span class="pl-kos">{</span>
              <span class="pl-s">"type"</span> : <span class="pl-s">"synonym"</span><span class="pl-kos">,</span>
              <span class="pl-s">"synonyms"</span> : <span class="pl-kos">[</span> <span class="pl-s">"incorrect1=&gt;correct1"</span><span class="pl-kos">,</span> <span class="pl-s">"otherword=&gt;word2"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
              <span class="pl-s">"expand"</span> : <span class="pl-s">"false"</span>
            <span class="pl-kos">}</span><span class="pl-kos">,</span>
            <span class="pl-s">"synonyms"</span> : <span class="pl-kos">{</span>
              <span class="pl-s">"type"</span> : <span class="pl-s">"synonym"</span><span class="pl-kos">,</span>
              <span class="pl-s">"expand"</span> : <span class="pl-s">"true"</span><span class="pl-kos">,</span>
              <span class="pl-s">"synonyms"</span> : <span class="pl-kos">[</span> <span class="pl-s">"synonym1, synonym2"</span><span class="pl-kos">,</span> <span class="pl-s">"third, synthird"</span><span class="pl-kos">,</span> <span class="pl-s">"and=&gt;so on"</span> <span class="pl-kos">]</span>
            <span class="pl-kos">}</span><span class="pl-kos">,</span>
            <span class="pl-s">"stopwords"</span> : <span class="pl-kos">{</span>
              <span class="pl-s">"ignore_case"</span> : <span class="pl-s">"true"</span><span class="pl-kos">,</span>
              <span class="pl-s">"enable_position_increments"</span> : <span class="pl-s">"true"</span><span class="pl-kos">,</span>
              <span class="pl-s">"type"</span> : <span class="pl-s">"stop"</span><span class="pl-kos">,</span>
              <span class="pl-s">"stopwords"</span> : <span class="pl-kos">[</span> <span class="pl-s">"_danish_"</span> <span class="pl-kos">]</span>
            <span class="pl-kos">}</span>
          <span class="pl-kos">}</span><span class="pl-kos">,</span>
          <span class="pl-s">"analyzer"</span> : <span class="pl-kos">{</span>
            <span class="pl-s">"DidYouMeanAnalyzer"</span> : <span class="pl-kos">{</span>
              <span class="pl-s">"filter"</span> : <span class="pl-kos">[</span> <span class="pl-s">"lowercase"</span><span class="pl-kos">,</span> <span class="pl-s">"stopwords"</span><span class="pl-kos">,</span> <span class="pl-s">"synonyms"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
              <span class="pl-s">"char_filter"</span> : <span class="pl-kos">[</span> <span class="pl-s">"html_strip"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
              <span class="pl-s">"type"</span> : <span class="pl-s">"custom"</span><span class="pl-kos">,</span>
              <span class="pl-s">"tokenizer"</span> : <span class="pl-s">"standard"</span>
            <span class="pl-kos">}</span><span class="pl-kos">,</span>
            <span class="pl-s">"suggestions"</span> : <span class="pl-kos">{</span>
              <span class="pl-s">"filter"</span> : <span class="pl-kos">[</span> <span class="pl-s">"stopwords"</span><span class="pl-kos">,</span> <span class="pl-s">"lowercase"</span><span class="pl-kos">,</span> <span class="pl-s">"suggestions_shingle"</span><span class="pl-kos">,</span> <span class="pl-s">"trim"</span><span class="pl-kos">,</span> <span class="pl-s">"unique"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
              <span class="pl-s">"char_filter"</span> : <span class="pl-kos">[</span> <span class="pl-s">"html_strip"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
              <span class="pl-s">"type"</span> : <span class="pl-s">"custom"</span><span class="pl-kos">,</span>
              <span class="pl-s">"tokenizer"</span> : <span class="pl-s">"standard"</span>
            <span class="pl-kos">}</span><span class="pl-kos">,</span>
            <span class="pl-s">"default"</span> : <span class="pl-kos">{</span>
              <span class="pl-s">"filter"</span> : <span class="pl-kos">[</span> <span class="pl-s">"lowercase"</span><span class="pl-kos">,</span> <span class="pl-s">"spellcorrections"</span><span class="pl-kos">,</span> <span class="pl-s">"synonyms"</span><span class="pl-kos">,</span> <span class="pl-s">"stopwords"</span><span class="pl-kos">,</span> <span class="pl-s">"stemmer"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
              <span class="pl-s">"char_filter"</span> : <span class="pl-kos">[</span> <span class="pl-s">"html_strip"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
              <span class="pl-s">"type"</span> : <span class="pl-s">"custom"</span><span class="pl-kos">,</span>
              <span class="pl-s">"tokenizer"</span> : <span class="pl-s">"standard"</span>
            <span class="pl-kos">}</span>
          <span class="pl-kos">}</span>
        <span class="pl-kos">}</span><span class="pl-kos">,</span>
        <span class="pl-s">"number_of_shards"</span> : <span class="pl-s">"5"</span><span class="pl-kos">,</span>
        <span class="pl-s">"number_of_replicas"</span> : <span class="pl-s">"0"</span><span class="pl-kos">,</span>
        <span class="pl-s">"version"</span> : <span class="pl-kos">{</span>
          <span class="pl-s">"created"</span> : <span class="pl-s">"1040199"</span>
        <span class="pl-kos">}</span><span class="pl-kos">,</span>
        <span class="pl-s">"uuid"</span> : <span class="pl-s">"1NS67y_4S4qdEEk2_L2r5w"</span>
      <span class="pl-kos">}</span>
    <span class="pl-kos">}</span>
  <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">POST <a href="http://localhost:9200/test_index/_close/" rel="nofollow">http://localhost:9200/test_index/_close/</a></p>
<p dir="auto">PUT <a href="http://localhost:9200/test_index/_settings" rel="nofollow">http://localhost:9200/test_index/_settings</a></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;test_index&quot; : {
    &quot;settings&quot; : {
      &quot;index&quot; : {
        &quot;creation_date&quot; : &quot;1417564655756&quot;,
        &quot;analysis&quot; : {
          &quot;filter&quot; : {
            &quot;stemmer&quot; : {
              &quot;type&quot; : &quot;stemmer&quot;,
              &quot;language&quot; : &quot;danish&quot;
            },
            &quot;suggestions_shingle&quot; : {
              &quot;min_shingle_size&quot; : &quot;2&quot;,
              &quot;max_shingle_size&quot; : &quot;5&quot;,
              &quot;type&quot; : &quot;shingle&quot;,
              &quot;filler_token&quot; : &quot;&quot;
            },
            &quot;spellcorrections&quot; : {
              &quot;type&quot; : &quot;synonym&quot;,
              &quot;synonyms&quot; : [],
              &quot;expand&quot; : &quot;false&quot;
            },
            &quot;synonyms&quot; : {
              &quot;type&quot; : &quot;synonym&quot;,
              &quot;expand&quot; : &quot;true&quot;,
              &quot;synonyms&quot; : [ &quot;test, test&quot; ]
            },
            &quot;stopwords&quot; : {
              &quot;ignore_case&quot; : &quot;true&quot;,
              &quot;enable_position_increments&quot; : &quot;true&quot;,
              &quot;type&quot; : &quot;stop&quot;,
              &quot;stopwords&quot; : [ &quot;_danish_&quot; ]
            }
          },
          &quot;analyzer&quot; : {
            &quot;DidYouMeanAnalyzer&quot; : {
              &quot;filter&quot; : [ &quot;lowercase&quot;, &quot;stopwords&quot;, &quot;synonyms&quot; ],
              &quot;char_filter&quot; : [ &quot;html_strip&quot; ],
              &quot;type&quot; : &quot;custom&quot;,
              &quot;tokenizer&quot; : &quot;standard&quot;
            },
            &quot;suggestions&quot; : {
              &quot;filter&quot; : [ &quot;stopwords&quot; ],
              &quot;char_filter&quot; : [ &quot;html_strip&quot; ],
              &quot;type&quot; : &quot;custom&quot;,
              &quot;tokenizer&quot; : &quot;standard&quot;
            },
            &quot;default&quot; : {
              &quot;filter&quot; : [ &quot;lowercase&quot;, &quot;spellcorrections&quot;, &quot;synonyms&quot;, &quot;stopwords&quot;, &quot;stemmer&quot; ],
              &quot;char_filter&quot; : [ &quot;html_strip&quot; ],
              &quot;type&quot; : &quot;custom&quot;,
              &quot;tokenizer&quot; : &quot;standard&quot;
            }
          }
        },
        &quot;number_of_shards&quot; : &quot;5&quot;,
        &quot;number_of_replicas&quot; : &quot;0&quot;,
        &quot;version&quot; : {
          &quot;created&quot; : &quot;1040199&quot;
        },
        &quot;uuid&quot; : &quot;1NS67y_4S4qdEEk2_L2r5w&quot;
      }
    }
  }
}"><pre class="notranslate"><span class="pl-kos">{</span>
  <span class="pl-s">"test_index"</span> : <span class="pl-kos">{</span>
    <span class="pl-s">"settings"</span> : <span class="pl-kos">{</span>
      <span class="pl-s">"index"</span> : <span class="pl-kos">{</span>
        <span class="pl-s">"creation_date"</span> : <span class="pl-s">"1417564655756"</span><span class="pl-kos">,</span>
        <span class="pl-s">"analysis"</span> : <span class="pl-kos">{</span>
          <span class="pl-s">"filter"</span> : <span class="pl-kos">{</span>
            <span class="pl-s">"stemmer"</span> : <span class="pl-kos">{</span>
              <span class="pl-s">"type"</span> : <span class="pl-s">"stemmer"</span><span class="pl-kos">,</span>
              <span class="pl-s">"language"</span> : <span class="pl-s">"danish"</span>
            <span class="pl-kos">}</span><span class="pl-kos">,</span>
            <span class="pl-s">"suggestions_shingle"</span> : <span class="pl-kos">{</span>
              <span class="pl-s">"min_shingle_size"</span> : <span class="pl-s">"2"</span><span class="pl-kos">,</span>
              <span class="pl-s">"max_shingle_size"</span> : <span class="pl-s">"5"</span><span class="pl-kos">,</span>
              <span class="pl-s">"type"</span> : <span class="pl-s">"shingle"</span><span class="pl-kos">,</span>
              <span class="pl-s">"filler_token"</span> : <span class="pl-s">""</span>
            <span class="pl-kos">}</span><span class="pl-kos">,</span>
            <span class="pl-s">"spellcorrections"</span> : <span class="pl-kos">{</span>
              <span class="pl-s">"type"</span> : <span class="pl-s">"synonym"</span><span class="pl-kos">,</span>
              <span class="pl-s">"synonyms"</span> : <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
              <span class="pl-s">"expand"</span> : <span class="pl-s">"false"</span>
            <span class="pl-kos">}</span><span class="pl-kos">,</span>
            <span class="pl-s">"synonyms"</span> : <span class="pl-kos">{</span>
              <span class="pl-s">"type"</span> : <span class="pl-s">"synonym"</span><span class="pl-kos">,</span>
              <span class="pl-s">"expand"</span> : <span class="pl-s">"true"</span><span class="pl-kos">,</span>
              <span class="pl-s">"synonyms"</span> : <span class="pl-kos">[</span> <span class="pl-s">"test, test"</span> <span class="pl-kos">]</span>
            <span class="pl-kos">}</span><span class="pl-kos">,</span>
            <span class="pl-s">"stopwords"</span> : <span class="pl-kos">{</span>
              <span class="pl-s">"ignore_case"</span> : <span class="pl-s">"true"</span><span class="pl-kos">,</span>
              <span class="pl-s">"enable_position_increments"</span> : <span class="pl-s">"true"</span><span class="pl-kos">,</span>
              <span class="pl-s">"type"</span> : <span class="pl-s">"stop"</span><span class="pl-kos">,</span>
              <span class="pl-s">"stopwords"</span> : <span class="pl-kos">[</span> <span class="pl-s">"_danish_"</span> <span class="pl-kos">]</span>
            <span class="pl-kos">}</span>
          <span class="pl-kos">}</span><span class="pl-kos">,</span>
          <span class="pl-s">"analyzer"</span> : <span class="pl-kos">{</span>
            <span class="pl-s">"DidYouMeanAnalyzer"</span> : <span class="pl-kos">{</span>
              <span class="pl-s">"filter"</span> : <span class="pl-kos">[</span> <span class="pl-s">"lowercase"</span><span class="pl-kos">,</span> <span class="pl-s">"stopwords"</span><span class="pl-kos">,</span> <span class="pl-s">"synonyms"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
              <span class="pl-s">"char_filter"</span> : <span class="pl-kos">[</span> <span class="pl-s">"html_strip"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
              <span class="pl-s">"type"</span> : <span class="pl-s">"custom"</span><span class="pl-kos">,</span>
              <span class="pl-s">"tokenizer"</span> : <span class="pl-s">"standard"</span>
            <span class="pl-kos">}</span><span class="pl-kos">,</span>
            <span class="pl-s">"suggestions"</span> : <span class="pl-kos">{</span>
              <span class="pl-s">"filter"</span> : <span class="pl-kos">[</span> <span class="pl-s">"stopwords"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
              <span class="pl-s">"char_filter"</span> : <span class="pl-kos">[</span> <span class="pl-s">"html_strip"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
              <span class="pl-s">"type"</span> : <span class="pl-s">"custom"</span><span class="pl-kos">,</span>
              <span class="pl-s">"tokenizer"</span> : <span class="pl-s">"standard"</span>
            <span class="pl-kos">}</span><span class="pl-kos">,</span>
            <span class="pl-s">"default"</span> : <span class="pl-kos">{</span>
              <span class="pl-s">"filter"</span> : <span class="pl-kos">[</span> <span class="pl-s">"lowercase"</span><span class="pl-kos">,</span> <span class="pl-s">"spellcorrections"</span><span class="pl-kos">,</span> <span class="pl-s">"synonyms"</span><span class="pl-kos">,</span> <span class="pl-s">"stopwords"</span><span class="pl-kos">,</span> <span class="pl-s">"stemmer"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
              <span class="pl-s">"char_filter"</span> : <span class="pl-kos">[</span> <span class="pl-s">"html_strip"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
              <span class="pl-s">"type"</span> : <span class="pl-s">"custom"</span><span class="pl-kos">,</span>
              <span class="pl-s">"tokenizer"</span> : <span class="pl-s">"standard"</span>
            <span class="pl-kos">}</span>
          <span class="pl-kos">}</span>
        <span class="pl-kos">}</span><span class="pl-kos">,</span>
        <span class="pl-s">"number_of_shards"</span> : <span class="pl-s">"5"</span><span class="pl-kos">,</span>
        <span class="pl-s">"number_of_replicas"</span> : <span class="pl-s">"0"</span><span class="pl-kos">,</span>
        <span class="pl-s">"version"</span> : <span class="pl-kos">{</span>
          <span class="pl-s">"created"</span> : <span class="pl-s">"1040199"</span>
        <span class="pl-kos">}</span><span class="pl-kos">,</span>
        <span class="pl-s">"uuid"</span> : <span class="pl-s">"1NS67y_4S4qdEEk2_L2r5w"</span>
      <span class="pl-kos">}</span>
    <span class="pl-kos">}</span>
  <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">POST <a href="http://localhost:9200/test_index/_open" rel="nofollow">http://localhost:9200/test_index/_open</a></p>
<p dir="auto">GET <a href="http://localhost:9200/test_index/_settings?pretty" rel="nofollow">http://localhost:9200/test_index/_settings?pretty</a></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;test_index&quot; : {
    &quot;settings&quot; : {
      &quot;index&quot; : {
        &quot;creation_date&quot; : &quot;1417771048233&quot;,
        &quot;number_of_shards&quot; : &quot;5&quot;,
        &quot;test_index&quot; : {
          &quot;settings&quot; : {
            &quot;index&quot; : {
              &quot;creation_date&quot; : &quot;1417564655756&quot;,
              &quot;analysis&quot; : {
                &quot;filter&quot; : {
                  &quot;stemmer&quot; : {
                    &quot;type&quot; : &quot;stemmer&quot;,
                    &quot;language&quot; : &quot;danish&quot;
                  },
                  &quot;suggestions_shingle&quot; : {
                    &quot;min_shingle_size&quot; : &quot;2&quot;,
                    &quot;max_shingle_size&quot; : &quot;5&quot;,
                    &quot;type&quot; : &quot;shingle&quot;,
                    &quot;filler_token&quot; : &quot;&quot;
                  },
                  &quot;spellcorrections&quot; : {
                    &quot;type&quot; : &quot;synonym&quot;,
                    &quot;synonyms&quot; : [ &quot;incorrect1=&gt;correct1&quot;, &quot;otherword=&gt;word2&quot; ],
                    &quot;expand&quot; : &quot;false&quot;
                  },
                  &quot;synonyms&quot; : {
                    &quot;type&quot; : &quot;synonym&quot;,
                    &quot;synonyms&quot; : [ &quot;test, test&quot;, &quot;third, synthird&quot;, &quot;and=&gt;so on&quot; ],
                    &quot;expand&quot; : &quot;true&quot;
                  },
                  &quot;stopwords&quot; : {
                    &quot;ignore_case&quot; : &quot;true&quot;,
                    &quot;enable_position_increments&quot; : &quot;true&quot;,
                    &quot;type&quot; : &quot;stop&quot;,
                    &quot;stopwords&quot; : [ &quot;_danish_&quot; ]
                  }
                },
                &quot;analyzer&quot; : {
                  &quot;DidYouMeanAnalyzer&quot; : {
                    &quot;filter&quot; : [ &quot;lowercase&quot;, &quot;stopwords&quot;, &quot;synonyms&quot; ],
                    &quot;char_filter&quot; : [ &quot;html_strip&quot; ],
                    &quot;type&quot; : &quot;custom&quot;,
                    &quot;tokenizer&quot; : &quot;standard&quot;
                  },
                  &quot;suggestions&quot; : {
                    &quot;filter&quot; : [ &quot;stopwords&quot;, &quot;lowercase&quot;, &quot;suggestions_shingle&quot;, &quot;trim&quot;, &quot;unique&quot; ],
                    &quot;char_filter&quot; : [ &quot;html_strip&quot; ],
                    &quot;type&quot; : &quot;custom&quot;,
                    &quot;tokenizer&quot; : &quot;standard&quot;
                  },
                  &quot;default&quot; : {
                    &quot;filter&quot; : [ &quot;lowercase&quot;, &quot;spellcorrections&quot;, &quot;synonyms&quot;, &quot;stopwords&quot;, &quot;stemmer&quot; ],
                    &quot;char_filter&quot; : [ &quot;html_strip&quot; ],
                    &quot;type&quot; : &quot;custom&quot;,
                    &quot;tokenizer&quot; : &quot;standard&quot;
                  }
                }
              },
              &quot;number_of_shards&quot; : &quot;5&quot;,
              &quot;version&quot; : {
                &quot;created&quot; : &quot;1040199&quot;
              },
              &quot;uuid&quot; : &quot;1NS67y_4S4qdEEk2_L2r5w&quot;,
              &quot;number_of_replicas&quot; : &quot;0&quot;
            }
          }
        },
        &quot;number_of_replicas&quot; : &quot;0&quot;,
        &quot;version&quot; : {
          &quot;created&quot; : &quot;1040199&quot;
        },
        &quot;uuid&quot; : &quot;fmWSN1gNQ-G0qpQz9AxG7A&quot;
      }
    }
  }
}"><pre class="notranslate"><span class="pl-kos">{</span>
  <span class="pl-s">"test_index"</span> : <span class="pl-kos">{</span>
    <span class="pl-s">"settings"</span> : <span class="pl-kos">{</span>
      <span class="pl-s">"index"</span> : <span class="pl-kos">{</span>
        <span class="pl-s">"creation_date"</span> : <span class="pl-s">"1417771048233"</span><span class="pl-kos">,</span>
        <span class="pl-s">"number_of_shards"</span> : <span class="pl-s">"5"</span><span class="pl-kos">,</span>
        <span class="pl-s">"test_index"</span> : <span class="pl-kos">{</span>
          <span class="pl-s">"settings"</span> : <span class="pl-kos">{</span>
            <span class="pl-s">"index"</span> : <span class="pl-kos">{</span>
              <span class="pl-s">"creation_date"</span> : <span class="pl-s">"1417564655756"</span><span class="pl-kos">,</span>
              <span class="pl-s">"analysis"</span> : <span class="pl-kos">{</span>
                <span class="pl-s">"filter"</span> : <span class="pl-kos">{</span>
                  <span class="pl-s">"stemmer"</span> : <span class="pl-kos">{</span>
                    <span class="pl-s">"type"</span> : <span class="pl-s">"stemmer"</span><span class="pl-kos">,</span>
                    <span class="pl-s">"language"</span> : <span class="pl-s">"danish"</span>
                  <span class="pl-kos">}</span><span class="pl-kos">,</span>
                  <span class="pl-s">"suggestions_shingle"</span> : <span class="pl-kos">{</span>
                    <span class="pl-s">"min_shingle_size"</span> : <span class="pl-s">"2"</span><span class="pl-kos">,</span>
                    <span class="pl-s">"max_shingle_size"</span> : <span class="pl-s">"5"</span><span class="pl-kos">,</span>
                    <span class="pl-s">"type"</span> : <span class="pl-s">"shingle"</span><span class="pl-kos">,</span>
                    <span class="pl-s">"filler_token"</span> : <span class="pl-s">""</span>
                  <span class="pl-kos">}</span><span class="pl-kos">,</span>
                  <span class="pl-s">"spellcorrections"</span> : <span class="pl-kos">{</span>
                    <span class="pl-s">"type"</span> : <span class="pl-s">"synonym"</span><span class="pl-kos">,</span>
                    <span class="pl-s">"synonyms"</span> : <span class="pl-kos">[</span> <span class="pl-s">"incorrect1=&gt;correct1"</span><span class="pl-kos">,</span> <span class="pl-s">"otherword=&gt;word2"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
                    <span class="pl-s">"expand"</span> : <span class="pl-s">"false"</span>
                  <span class="pl-kos">}</span><span class="pl-kos">,</span>
                  <span class="pl-s">"synonyms"</span> : <span class="pl-kos">{</span>
                    <span class="pl-s">"type"</span> : <span class="pl-s">"synonym"</span><span class="pl-kos">,</span>
                    <span class="pl-s">"synonyms"</span> : <span class="pl-kos">[</span> <span class="pl-s">"test, test"</span><span class="pl-kos">,</span> <span class="pl-s">"third, synthird"</span><span class="pl-kos">,</span> <span class="pl-s">"and=&gt;so on"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
                    <span class="pl-s">"expand"</span> : <span class="pl-s">"true"</span>
                  <span class="pl-kos">}</span><span class="pl-kos">,</span>
                  <span class="pl-s">"stopwords"</span> : <span class="pl-kos">{</span>
                    <span class="pl-s">"ignore_case"</span> : <span class="pl-s">"true"</span><span class="pl-kos">,</span>
                    <span class="pl-s">"enable_position_increments"</span> : <span class="pl-s">"true"</span><span class="pl-kos">,</span>
                    <span class="pl-s">"type"</span> : <span class="pl-s">"stop"</span><span class="pl-kos">,</span>
                    <span class="pl-s">"stopwords"</span> : <span class="pl-kos">[</span> <span class="pl-s">"_danish_"</span> <span class="pl-kos">]</span>
                  <span class="pl-kos">}</span>
                <span class="pl-kos">}</span><span class="pl-kos">,</span>
                <span class="pl-s">"analyzer"</span> : <span class="pl-kos">{</span>
                  <span class="pl-s">"DidYouMeanAnalyzer"</span> : <span class="pl-kos">{</span>
                    <span class="pl-s">"filter"</span> : <span class="pl-kos">[</span> <span class="pl-s">"lowercase"</span><span class="pl-kos">,</span> <span class="pl-s">"stopwords"</span><span class="pl-kos">,</span> <span class="pl-s">"synonyms"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
                    <span class="pl-s">"char_filter"</span> : <span class="pl-kos">[</span> <span class="pl-s">"html_strip"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
                    <span class="pl-s">"type"</span> : <span class="pl-s">"custom"</span><span class="pl-kos">,</span>
                    <span class="pl-s">"tokenizer"</span> : <span class="pl-s">"standard"</span>
                  <span class="pl-kos">}</span><span class="pl-kos">,</span>
                  <span class="pl-s">"suggestions"</span> : <span class="pl-kos">{</span>
                    <span class="pl-s">"filter"</span> : <span class="pl-kos">[</span> <span class="pl-s">"stopwords"</span><span class="pl-kos">,</span> <span class="pl-s">"lowercase"</span><span class="pl-kos">,</span> <span class="pl-s">"suggestions_shingle"</span><span class="pl-kos">,</span> <span class="pl-s">"trim"</span><span class="pl-kos">,</span> <span class="pl-s">"unique"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
                    <span class="pl-s">"char_filter"</span> : <span class="pl-kos">[</span> <span class="pl-s">"html_strip"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
                    <span class="pl-s">"type"</span> : <span class="pl-s">"custom"</span><span class="pl-kos">,</span>
                    <span class="pl-s">"tokenizer"</span> : <span class="pl-s">"standard"</span>
                  <span class="pl-kos">}</span><span class="pl-kos">,</span>
                  <span class="pl-s">"default"</span> : <span class="pl-kos">{</span>
                    <span class="pl-s">"filter"</span> : <span class="pl-kos">[</span> <span class="pl-s">"lowercase"</span><span class="pl-kos">,</span> <span class="pl-s">"spellcorrections"</span><span class="pl-kos">,</span> <span class="pl-s">"synonyms"</span><span class="pl-kos">,</span> <span class="pl-s">"stopwords"</span><span class="pl-kos">,</span> <span class="pl-s">"stemmer"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
                    <span class="pl-s">"char_filter"</span> : <span class="pl-kos">[</span> <span class="pl-s">"html_strip"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span>
                    <span class="pl-s">"type"</span> : <span class="pl-s">"custom"</span><span class="pl-kos">,</span>
                    <span class="pl-s">"tokenizer"</span> : <span class="pl-s">"standard"</span>
                  <span class="pl-kos">}</span>
                <span class="pl-kos">}</span>
              <span class="pl-kos">}</span><span class="pl-kos">,</span>
              <span class="pl-s">"number_of_shards"</span> : <span class="pl-s">"5"</span><span class="pl-kos">,</span>
              <span class="pl-s">"version"</span> : <span class="pl-kos">{</span>
                <span class="pl-s">"created"</span> : <span class="pl-s">"1040199"</span>
              <span class="pl-kos">}</span><span class="pl-kos">,</span>
              <span class="pl-s">"uuid"</span> : <span class="pl-s">"1NS67y_4S4qdEEk2_L2r5w"</span><span class="pl-kos">,</span>
              <span class="pl-s">"number_of_replicas"</span> : <span class="pl-s">"0"</span>
            <span class="pl-kos">}</span>
          <span class="pl-kos">}</span>
        <span class="pl-kos">}</span><span class="pl-kos">,</span>
        <span class="pl-s">"number_of_replicas"</span> : <span class="pl-s">"0"</span><span class="pl-kos">,</span>
        <span class="pl-s">"version"</span> : <span class="pl-kos">{</span>
          <span class="pl-s">"created"</span> : <span class="pl-s">"1040199"</span>
        <span class="pl-kos">}</span><span class="pl-kos">,</span>
        <span class="pl-s">"uuid"</span> : <span class="pl-s">"fmWSN1gNQ-G0qpQz9AxG7A"</span>
      <span class="pl-kos">}</span>
    <span class="pl-kos">}</span>
  <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">As you see synonyms i expect to be just</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;synonyms&quot; : [ &quot;test, test&quot; ]"><pre class="notranslate"><span class="pl-s">"synonyms"</span> : <span class="pl-kos">[</span> <span class="pl-s">"test, test"</span> <span class="pl-kos">]</span></pre></div>
<p dir="auto">and   suggestions analyzer to have only one filter</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="              &quot;filter&quot; : [ &quot;stopwords&quot; ],"><pre class="notranslate">              <span class="pl-s">"filter"</span> : <span class="pl-kos">[</span> <span class="pl-s">"stopwords"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span></pre></div>
<p dir="auto"><strong>Version 1.2.2</strong></p>
<p dir="auto">An elastic search instance is running with the following arguments:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/usr/lib/jvm/java-7-oracle/bin/java -Xms15g -Xmx15g -Xss256k -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.pidfile=/var/run/elasticsearch.pid -Des.path.home=/usr/share/elasticsearch -cp :/usr/share/elasticsearch/lib/elasticsearch-1.2.2.jar:/usr/share/elasticsearch/lib/*:/usr/share/elasticsearch/lib/sigar/* -Des.default.config=/etc/elasticsearch/elasticsearch.yml -Des.default.path.home=/usr/share/elasticsearch -Des.default.path.logs=/var/log/elasticsearch -Des.default.path.data=/var/lib/elasticsearch -Des.default.path.work=/tmp/elasticsearch -Des.default.path.conf=/etc/elasticsearch org.elasticsearch.bootstrap.Elasticsearch"><pre class="notranslate"><code class="notranslate">/usr/lib/jvm/java-7-oracle/bin/java -Xms15g -Xmx15g -Xss256k -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.pidfile=/var/run/elasticsearch.pid -Des.path.home=/usr/share/elasticsearch -cp :/usr/share/elasticsearch/lib/elasticsearch-1.2.2.jar:/usr/share/elasticsearch/lib/*:/usr/share/elasticsearch/lib/sigar/* -Des.default.config=/etc/elasticsearch/elasticsearch.yml -Des.default.path.home=/usr/share/elasticsearch -Des.default.path.logs=/var/log/elasticsearch -Des.default.path.data=/var/lib/elasticsearch -Des.default.path.work=/tmp/elasticsearch -Des.default.path.conf=/etc/elasticsearch org.elasticsearch.bootstrap.Elasticsearch
</code></pre></div>
<p dir="auto"><code class="notranslate">es.default.path.data</code> is coming from the deb package's init.d script.</p>
<p dir="auto">Inside the <code class="notranslate">elasticsearch.yml</code>, if we declare <code class="notranslate">path.data</code> as an array, we end up with 3 data directories according to ES.</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="path:
  data:
    - /var/lib/elasticsearch/data1
    - /var/lib/elasticsearch/data2"><pre class="notranslate"><span class="pl-ent">path</span>:
  <span class="pl-ent">data</span>:
    - <span class="pl-s">/var/lib/elasticsearch/data1</span>
    - <span class="pl-s">/var/lib/elasticsearch/data2</span></pre></div>
<p dir="auto">When ES runs, it now thinks there are 3 data directories. The one being set as default through the CLI arguments, plus the 2 new ones that were added in the config.</p>
<p dir="auto">According to <code class="notranslate">/_nodes/stats?all=true</code>, we have this (snipped to relevant parts):</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
    &quot;nodes&quot;: {
        &quot;FOSlksI8ToK6G4YdIylYvQ&quot;: {
            &quot;fs&quot;: {
                &quot;data&quot;: [{
                    &quot;path&quot;: &quot;/var/lib/elasticsearch/home/nodes/0&quot;,
                    &quot;mount&quot;: &quot;/&quot;,
                    &quot;dev&quot;: &quot;/dev/sda6&quot;,
                    &quot;total_in_bytes&quot;: 982560202752,
                    &quot;free_in_bytes&quot;: 860723675136,
                    &quot;available_in_bytes&quot;: 810788864000,
                    &quot;disk_reads&quot;: 12402994,
                    &quot;disk_writes&quot;: 14437097,
                    &quot;disk_io_op&quot;: 26840091,
                    &quot;disk_read_size_in_bytes&quot;: 364877214720,
                    &quot;disk_write_size_in_bytes&quot;: 1342705430528,
                    &quot;disk_io_size_in_bytes&quot;: 1707582645248,
                    &quot;disk_queue&quot;: &quot;2.4&quot;,
                    &quot;disk_service_time&quot;: &quot;2.1&quot;
                }, {
                    &quot;path&quot;: &quot;/var/lib/elasticsearch/data1/home/nodes/0&quot;,
                    &quot;mount&quot;: &quot;/var/lib/elasticsearch/data1&quot;,
                    &quot;dev&quot;: &quot;/dev/sdc1&quot;,
                    &quot;total_in_bytes&quot;: 787239469056,
                    &quot;free_in_bytes&quot;: 787167297536,
                    &quot;available_in_bytes&quot;: 747154268160,
                    &quot;disk_reads&quot;: 691,
                    &quot;disk_writes&quot;: 49627,
                    &quot;disk_io_op&quot;: 50318,
                    &quot;disk_read_size_in_bytes&quot;: 2851840,
                    &quot;disk_write_size_in_bytes&quot;: 12656103424,
                    &quot;disk_io_size_in_bytes&quot;: 12658955264,
                    &quot;disk_queue&quot;: &quot;2.4&quot;,
                    &quot;disk_service_time&quot;: &quot;2.1&quot;
                }, {
                    &quot;path&quot;: &quot;/var/lib/elasticsearch/data2/home/nodes/0&quot;,
                    &quot;mount&quot;: &quot;/var/lib/elasticsearch/data2&quot;,
                    &quot;dev&quot;: &quot;/dev/sdd1&quot;,
                    &quot;total_in_bytes&quot;: 787239469056,
                    &quot;free_in_bytes&quot;: 787142717440,
                    &quot;available_in_bytes&quot;: 747129688064,
                    &quot;disk_reads&quot;: 9461,
                    &quot;disk_writes&quot;: 883718,
                    &quot;disk_io_op&quot;: 893179,
                    &quot;disk_read_size_in_bytes&quot;: 39285760,
                    &quot;disk_write_size_in_bytes&quot;: 174312841216,
                    &quot;disk_io_size_in_bytes&quot;: 174352126976,
                    &quot;disk_queue&quot;: &quot;2.4&quot;,
                    &quot;disk_service_time&quot;: &quot;2.1&quot;
                }]
            },
        }
    }
}"><pre class="notranslate">{
    <span class="pl-ent">"nodes"</span>: {
        <span class="pl-ent">"FOSlksI8ToK6G4YdIylYvQ"</span>: {
            <span class="pl-ent">"fs"</span>: {
                <span class="pl-ent">"data"</span>: [{
                    <span class="pl-ent">"path"</span>: <span class="pl-s"><span class="pl-pds">"</span>/var/lib/elasticsearch/home/nodes/0<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"mount"</span>: <span class="pl-s"><span class="pl-pds">"</span>/<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"dev"</span>: <span class="pl-s"><span class="pl-pds">"</span>/dev/sda6<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"total_in_bytes"</span>: <span class="pl-c1">982560202752</span>,
                    <span class="pl-ent">"free_in_bytes"</span>: <span class="pl-c1">860723675136</span>,
                    <span class="pl-ent">"available_in_bytes"</span>: <span class="pl-c1">810788864000</span>,
                    <span class="pl-ent">"disk_reads"</span>: <span class="pl-c1">12402994</span>,
                    <span class="pl-ent">"disk_writes"</span>: <span class="pl-c1">14437097</span>,
                    <span class="pl-ent">"disk_io_op"</span>: <span class="pl-c1">26840091</span>,
                    <span class="pl-ent">"disk_read_size_in_bytes"</span>: <span class="pl-c1">364877214720</span>,
                    <span class="pl-ent">"disk_write_size_in_bytes"</span>: <span class="pl-c1">1342705430528</span>,
                    <span class="pl-ent">"disk_io_size_in_bytes"</span>: <span class="pl-c1">1707582645248</span>,
                    <span class="pl-ent">"disk_queue"</span>: <span class="pl-s"><span class="pl-pds">"</span>2.4<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"disk_service_time"</span>: <span class="pl-s"><span class="pl-pds">"</span>2.1<span class="pl-pds">"</span></span>
                }, {
                    <span class="pl-ent">"path"</span>: <span class="pl-s"><span class="pl-pds">"</span>/var/lib/elasticsearch/data1/home/nodes/0<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"mount"</span>: <span class="pl-s"><span class="pl-pds">"</span>/var/lib/elasticsearch/data1<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"dev"</span>: <span class="pl-s"><span class="pl-pds">"</span>/dev/sdc1<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"total_in_bytes"</span>: <span class="pl-c1">787239469056</span>,
                    <span class="pl-ent">"free_in_bytes"</span>: <span class="pl-c1">787167297536</span>,
                    <span class="pl-ent">"available_in_bytes"</span>: <span class="pl-c1">747154268160</span>,
                    <span class="pl-ent">"disk_reads"</span>: <span class="pl-c1">691</span>,
                    <span class="pl-ent">"disk_writes"</span>: <span class="pl-c1">49627</span>,
                    <span class="pl-ent">"disk_io_op"</span>: <span class="pl-c1">50318</span>,
                    <span class="pl-ent">"disk_read_size_in_bytes"</span>: <span class="pl-c1">2851840</span>,
                    <span class="pl-ent">"disk_write_size_in_bytes"</span>: <span class="pl-c1">12656103424</span>,
                    <span class="pl-ent">"disk_io_size_in_bytes"</span>: <span class="pl-c1">12658955264</span>,
                    <span class="pl-ent">"disk_queue"</span>: <span class="pl-s"><span class="pl-pds">"</span>2.4<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"disk_service_time"</span>: <span class="pl-s"><span class="pl-pds">"</span>2.1<span class="pl-pds">"</span></span>
                }, {
                    <span class="pl-ent">"path"</span>: <span class="pl-s"><span class="pl-pds">"</span>/var/lib/elasticsearch/data2/home/nodes/0<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"mount"</span>: <span class="pl-s"><span class="pl-pds">"</span>/var/lib/elasticsearch/data2<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"dev"</span>: <span class="pl-s"><span class="pl-pds">"</span>/dev/sdd1<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"total_in_bytes"</span>: <span class="pl-c1">787239469056</span>,
                    <span class="pl-ent">"free_in_bytes"</span>: <span class="pl-c1">787142717440</span>,
                    <span class="pl-ent">"available_in_bytes"</span>: <span class="pl-c1">747129688064</span>,
                    <span class="pl-ent">"disk_reads"</span>: <span class="pl-c1">9461</span>,
                    <span class="pl-ent">"disk_writes"</span>: <span class="pl-c1">883718</span>,
                    <span class="pl-ent">"disk_io_op"</span>: <span class="pl-c1">893179</span>,
                    <span class="pl-ent">"disk_read_size_in_bytes"</span>: <span class="pl-c1">39285760</span>,
                    <span class="pl-ent">"disk_write_size_in_bytes"</span>: <span class="pl-c1">174312841216</span>,
                    <span class="pl-ent">"disk_io_size_in_bytes"</span>: <span class="pl-c1">174352126976</span>,
                    <span class="pl-ent">"disk_queue"</span>: <span class="pl-s"><span class="pl-pds">"</span>2.4<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"disk_service_time"</span>: <span class="pl-s"><span class="pl-pds">"</span>2.1<span class="pl-pds">"</span></span>
                }]
            },
        }
    }
}</pre></div>
<p dir="auto">And if we look at <code class="notranslate">/_nodes</code> we see what the raw settings are:</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
    &quot;nodes&quot;: {
        &quot;FOSlksI8ToK6G4YdIylYvQ&quot;: {
            &quot;settings&quot;: {
                &quot;path&quot;: {
                    &quot;data&quot;: &quot;/var/lib/elasticsearch&quot;,
                    &quot;work&quot;: &quot;/tmp/elasticsearch&quot;,
                    &quot;home&quot;: &quot;/usr/share/elasticsearch&quot;,
                    &quot;conf&quot;: &quot;/etc/elasticsearch&quot;,
                    &quot;logs&quot;: &quot;/var/log/elasticsearch&quot;,
                    &quot;data.0&quot;: &quot;/var/lib/elasticsearch/data1&quot;,
                    &quot;data.1&quot;: &quot;/var/lib/elasticsearch/data2&quot;
                }
            }
        }
    }
}"><pre class="notranslate">{
    <span class="pl-ent">"nodes"</span>: {
        <span class="pl-ent">"FOSlksI8ToK6G4YdIylYvQ"</span>: {
            <span class="pl-ent">"settings"</span>: {
                <span class="pl-ent">"path"</span>: {
                    <span class="pl-ent">"data"</span>: <span class="pl-s"><span class="pl-pds">"</span>/var/lib/elasticsearch<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"work"</span>: <span class="pl-s"><span class="pl-pds">"</span>/tmp/elasticsearch<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"home"</span>: <span class="pl-s"><span class="pl-pds">"</span>/usr/share/elasticsearch<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"conf"</span>: <span class="pl-s"><span class="pl-pds">"</span>/etc/elasticsearch<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"logs"</span>: <span class="pl-s"><span class="pl-pds">"</span>/var/log/elasticsearch<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"data.0"</span>: <span class="pl-s"><span class="pl-pds">"</span>/var/lib/elasticsearch/data1<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"data.1"</span>: <span class="pl-s"><span class="pl-pds">"</span>/var/lib/elasticsearch/data2<span class="pl-pds">"</span></span>
                }
            }
        }
    }
}</pre></div>
<p dir="auto">So in this case, we see that there are 3 different data keys according to settings, and 3 different data directories. A <strong>data</strong>, <strong>data.0</strong> and <strong>data.1</strong>.</p>
<p dir="auto">Now, if we declare in our yaml, <strong>data</strong> as just a comma separated as a string, this does the correct behavior and overrides what the default was.</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="path:
    data: /var/lib/elasticsearch/data1,/var/lib/elasticsearch/data2"><pre class="notranslate"><span class="pl-ent">path</span>:
    <span class="pl-ent">data</span>: <span class="pl-s">/var/lib/elasticsearch/data1,/var/lib/elasticsearch/data2</span></pre></div>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="                &quot;data&quot;: [{
                    &quot;path&quot;: &quot;/var/lib/elasticsearch/data1/home/nodes/0&quot;,
                    &quot;mount&quot;: &quot;/var/lib/elasticsearch/data1&quot;,
                    &quot;dev&quot;: &quot;/dev/sdc1&quot;,
                    &quot;total_in_bytes&quot;: 787239469056,
                    &quot;free_in_bytes&quot;: 787167391744,
                    &quot;available_in_bytes&quot;: 747154362368,
                    &quot;disk_reads&quot;: 687,
                    &quot;disk_writes&quot;: 49803,
                    &quot;disk_io_op&quot;: 50490,
                    &quot;disk_read_size_in_bytes&quot;: 2835456,
                    &quot;disk_write_size_in_bytes&quot;: 12657053696,
                    &quot;disk_io_size_in_bytes&quot;: 12659889152,
                    &quot;disk_queue&quot;: &quot;0&quot;,
                    &quot;disk_service_time&quot;: &quot;0&quot;
                }, {
                    &quot;path&quot;: &quot;/var/lib/elasticsearch/data2/home/nodes/0&quot;,
                    &quot;mount&quot;: &quot;/var/lib/elasticsearch/data2&quot;,
                    &quot;dev&quot;: &quot;/dev/sdd1&quot;,
                    &quot;total_in_bytes&quot;: 787239469056,
                    &quot;free_in_bytes&quot;: 787167391744,
                    &quot;available_in_bytes&quot;: 747154362368,
                    &quot;disk_reads&quot;: 3436,
                    &quot;disk_writes&quot;: 684613,
                    &quot;disk_io_op&quot;: 688049,
                    &quot;disk_read_size_in_bytes&quot;: 14308352,
                    &quot;disk_write_size_in_bytes&quot;: 132454891520,
                    &quot;disk_io_size_in_bytes&quot;: 132469199872,
                    &quot;disk_queue&quot;: &quot;0&quot;,
                    &quot;disk_service_time&quot;: &quot;0&quot;
                }]"><pre class="notranslate">                <span class="pl-ent">"data"</span>: [{
                    <span class="pl-ent">"path"</span>: <span class="pl-s"><span class="pl-pds">"</span>/var/lib/elasticsearch/data1/home/nodes/0<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"mount"</span>: <span class="pl-s"><span class="pl-pds">"</span>/var/lib/elasticsearch/data1<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"dev"</span>: <span class="pl-s"><span class="pl-pds">"</span>/dev/sdc1<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"total_in_bytes"</span>: <span class="pl-c1">787239469056</span>,
                    <span class="pl-ent">"free_in_bytes"</span>: <span class="pl-c1">787167391744</span>,
                    <span class="pl-ent">"available_in_bytes"</span>: <span class="pl-c1">747154362368</span>,
                    <span class="pl-ent">"disk_reads"</span>: <span class="pl-c1">687</span>,
                    <span class="pl-ent">"disk_writes"</span>: <span class="pl-c1">49803</span>,
                    <span class="pl-ent">"disk_io_op"</span>: <span class="pl-c1">50490</span>,
                    <span class="pl-ent">"disk_read_size_in_bytes"</span>: <span class="pl-c1">2835456</span>,
                    <span class="pl-ent">"disk_write_size_in_bytes"</span>: <span class="pl-c1">12657053696</span>,
                    <span class="pl-ent">"disk_io_size_in_bytes"</span>: <span class="pl-c1">12659889152</span>,
                    <span class="pl-ent">"disk_queue"</span>: <span class="pl-s"><span class="pl-pds">"</span>0<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"disk_service_time"</span>: <span class="pl-s"><span class="pl-pds">"</span>0<span class="pl-pds">"</span></span>
                }, {
                    <span class="pl-ent">"path"</span>: <span class="pl-s"><span class="pl-pds">"</span>/var/lib/elasticsearch/data2/home/nodes/0<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"mount"</span>: <span class="pl-s"><span class="pl-pds">"</span>/var/lib/elasticsearch/data2<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"dev"</span>: <span class="pl-s"><span class="pl-pds">"</span>/dev/sdd1<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"total_in_bytes"</span>: <span class="pl-c1">787239469056</span>,
                    <span class="pl-ent">"free_in_bytes"</span>: <span class="pl-c1">787167391744</span>,
                    <span class="pl-ent">"available_in_bytes"</span>: <span class="pl-c1">747154362368</span>,
                    <span class="pl-ent">"disk_reads"</span>: <span class="pl-c1">3436</span>,
                    <span class="pl-ent">"disk_writes"</span>: <span class="pl-c1">684613</span>,
                    <span class="pl-ent">"disk_io_op"</span>: <span class="pl-c1">688049</span>,
                    <span class="pl-ent">"disk_read_size_in_bytes"</span>: <span class="pl-c1">14308352</span>,
                    <span class="pl-ent">"disk_write_size_in_bytes"</span>: <span class="pl-c1">132454891520</span>,
                    <span class="pl-ent">"disk_io_size_in_bytes"</span>: <span class="pl-c1">132469199872</span>,
                    <span class="pl-ent">"disk_queue"</span>: <span class="pl-s"><span class="pl-pds">"</span>0<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"disk_service_time"</span>: <span class="pl-s"><span class="pl-pds">"</span>0<span class="pl-pds">"</span></span>
                }]</pre></div>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="                &quot;path&quot;: {
                    &quot;data&quot;: &quot;/var/lib/elasticsearch/data1,/var/lib/elasticsearch/data2&quot;,
                    &quot;work&quot;: &quot;/tmp/elasticsearch&quot;,
                    &quot;home&quot;: &quot;/usr/share/elasticsearch&quot;,
                    &quot;conf&quot;: &quot;/etc/elasticsearch&quot;,
                    &quot;logs&quot;: &quot;/var/log/elasticsearch&quot;
                },"><pre class="notranslate">                <span class="pl-ent">"path"</span>: {
                    <span class="pl-ent">"data"</span>: <span class="pl-s"><span class="pl-pds">"</span>/var/lib/elasticsearch/data1,/var/lib/elasticsearch/data2<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"work"</span>: <span class="pl-s"><span class="pl-pds">"</span>/tmp/elasticsearch<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"home"</span>: <span class="pl-s"><span class="pl-pds">"</span>/usr/share/elasticsearch<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"conf"</span>: <span class="pl-s"><span class="pl-pds">"</span>/etc/elasticsearch<span class="pl-pds">"</span></span>,
                    <span class="pl-ent">"logs"</span>: <span class="pl-s"><span class="pl-pds">"</span>/var/log/elasticsearch<span class="pl-pds">"</span></span>
                },</pre></div>
<p dir="auto">So the behavior that we're seeing is that the data array is being flattened into a list, and them being appended to the default. Whereas I'd expect this new list to override the default.</p>
<p dir="auto">I feel that the problem here is that data can be declared both as a string and as a list. It may be more <em>correct</em> if data were always a list internally, and when declaring as a string, it's coerced into a list, even if that list had one item. But I'm not proposing the solution, just a thought.</p>
<p dir="auto">I understand that this may not necessarily be a bug, but it is extremely unexpected behavior and took quite a bit of debugging to track down exactly what was going on.</p>