# Removing index settings

**URL:** <https://discuss.elastic.co/t/removing-index-settings/8458>\
**Category:** Elasticsearch\
**Created:** [July 19, 2012, 12:38am UTC](https://discuss.elastic.co/t/removing-index-settings/8458 "2012-07-19T00:38:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephen\_Beeson](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@Stephen\_Beeson](https://discuss.elastic.co/u/Stephen_Beeson)\
**Post date:** [July 19, 2012, 12:38am UTC](https://discuss.elastic.co/t/removing-index-settings/8458/1 "2012-07-19T00:38:09Z")

</div>

I have a configuration yml file that I am using to specify the analyzers  
that I am using to index our documents. This is working fine, however if I  
remove settings from the yml file, after updating elasticsearch, they are  
still there.

Is there a mechanism for removing individual properties from an indexes  
settings?

As an example, if I have set a number of filters, I see properties like so:  
"index.analysis.analyzer.my\_analyzer.filter.0" : "my\_stop\_words",  
"index.analysis.analyzer.my\_analyzer.filter.1" : "my\_stemmer",

If I remove my\_stemmer from the set of filters and update my settings the  
entry "index.analysis.analyzer.my\_analyzer.filter.1" remains.

Is there a way to remove these?

Thanks  
Stephen

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [July 19, 2012, 7:56am UTC](https://discuss.elastic.co/t/removing-index-settings/8458/2 "2012-07-19T07:56:15Z")

</div>

Hi Stephen

On Wed, 2012-07-18 at 17:38 -0700, Stephen Beeson wrote:

> I have a configuration yml file that I am using to specify the  
> analyzers that I am using to index our documents. This is working  
> fine, however if I remove settings from the yml file, after updating  
> elasticsearch, they are still there.

Any index settings in a config file are just used as a template for a  
new index. They aren't read and applied (eg) every time you restart.

Also, you can't change analyzers on an existing index\* so you have to  
create a new index and reindex your data from old to new.

- You actually can change analyzers on an existing index by closing the  
index, making your changes then opening the index. But: this could be  
used for adding analyzers, but should not be used for changing them, as  
your existing data would be indexed incorrectly.

clint

> Is there a mechanism for removing individual properties from an  
> indexes settings?
> 
> As an example, if I have set a number of filters, I see properties  
> like so:  
> "index.analysis.analyzer.my\_analyzer.filter.0" :  
> "my\_stop\_words",  
> "index.analysis.analyzer.my\_analyzer.filter.1" : "my\_stemmer",
> 
> If I remove my\_stemmer from the set of filters and update my settings  
> the entry "index.analysis.analyzer.my\_analyzer.filter.1" remains.
> 
> Is there a way to remove these?
> 
> Thanks  
> Stephen

---

<div class="post-metadata">

**Author:** ![Stephen\_Beeson](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@Stephen\_Beeson](https://discuss.elastic.co/u/Stephen_Beeson)\
**Post date:** [July 19, 2012, 8:03am UTC](https://discuss.elastic.co/t/removing-index-settings/8458/3 "2012-07-19T08:03:56Z")

</div>

Thanks for the response Clint.  
I've got a few scripts that update various settings, such as the mappings  
and the analyzers when we deploy. The one that updates the analyzers does  
close and open the index so that part of the updates is working.

For our needs, it's not critical that the documents are indexed exactly.  
We're ok if we change the indexing settings and then reindex over time. We  
also don't expect to be updating them too much after release.

I'm currently updating analyzer properties successfully, but would be great  
if I could remove them when needed.

Stephen

On Thursday, July 19, 2012 5:56:15 PM UTC+10, Clinton Gormley wrote:

> Hi Stephen
> 
> On Wed, 2012-07-18 at 17:38 -0700, Stephen Beeson wrote:
> 
> > I have a configuration yml file that I am using to specify the  
> > analyzers that I am using to index our documents. This is working  
> > fine, however if I remove settings from the yml file, after updating  
> > elasticsearch, they are still there.
> 
> Any index settings in a config file are just used as a template for a  
> new index. They aren't read and applied (eg) every time you restart.
> 
> Also, you can't change analyzers on an existing index\* so you have to  
> create a new index and reindex your data from old to new.
> 
> - You actually can change analyzers on an existing index by closing the  
> index, making your changes then opening the index. But: this could be  
> used for adding analyzers, but should not be used for changing them, as  
> your existing data would be indexed incorrectly.
> 
> clint
> 
> > Is there a mechanism for removing individual properties from an  
> > indexes settings?
> > 
> > As an example, if I have set a number of filters, I see properties  
> > like so:  
> > "index.analysis.analyzer.my\_analyzer.filter.0" :  
> > "my\_stop\_words",  
> > "index.analysis.analyzer.my\_analyzer.filter.1" : "my\_stemmer",
> > 
> > If I remove my\_stemmer from the set of filters and update my settings  
> > the entry "index.analysis.analyzer.my\_analyzer.filter.1" remains.
> > 
> > Is there a way to remove these?
> > 
> > Thanks  
> > Stephen

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [July 19, 2012, 8:36am UTC](https://discuss.elastic.co/t/removing-index-settings/8458/4 "2012-07-19T08:36:25Z")

</div>

Hi Stephen

On Thu, 2012-07-19 at 01:03 -0700, Stephen Beeson wrote:

> Thanks for the response Clint.  
> I've got a few scripts that update various settings, such as the  
> mappings and the analyzers when we deploy. The one that updates the  
> analyzers does close and open the index so that part of the updates is  
> working.
> 
> For our needs, it's not critical that the documents are indexed  
> exactly. We're ok if we change the indexing settings and then reindex  
> over time. We also don't expect to be updating them too much after  
> release.

That's not a great approach - it'll bite you. Changing the analyzers may  
make your existing data unsearchable (depending on the changes).

You might consider creating a new index with the new settings, and  
creating an alias that points to the old and new index. Then you can  
search across both indices using the alias, but the correct analyzers  
will be applied to each index

clint

> I'm currently updating analyzer properties successfully, but would be  
> great if I could remove them when needed.
> 
> Stephen
> 
> On Thursday, July 19, 2012 5:56:15 PM UTC+10, Clinton Gormley wrote:  
> Hi Stephen
> 
> ```
> On Wed, 2012-07-18 at 17:38 -0700, Stephen Beeson wrote: 
> > I have a configuration yml file that I am using to specify
> the 
> > analyzers that I am using to index our documents. This is
> working 
> > fine, however if I remove settings from the yml file, after
> updating 
> > elasticsearch, they are still there. 
>     
> Any index settings in a config file are just used as a
> template for a 
> new index. They aren't read and applied (eg) every time you
> restart. 
>     
> Also, you can't change analyzers on an existing index* so you
> have to 
> create a new index and reindex your data from old to new. 
>     
> * You actually can change analyzers on an existing index by
> closing the 
> index, making your changes then opening the index. But: this
> could be 
> used for adding analyzers, but should not be used for changing
> them, as 
> your existing data would be indexed incorrectly. 
>     
> clint 
>     
> > 
> > 
> > Is there a mechanism for removing individual properties from
> an 
> > indexes settings? 
> > 
> > 
> > As an example, if I have set a number of filters, I see
> properties 
> > like so: 
> > "index.analysis.analyzer.my_analyzer.filter.0" : 
> > "my_stop_words", 
> > "index.analysis.analyzer.my_analyzer.filter.1" :
> "my_stemmer", 
> >   
> > If I remove my_stemmer from the set of filters and update my
> settings 
> > the entry "index.analysis.analyzer.my_analyzer.filter.1"
> remains. 
> > 
> > 
> > Is there a way to remove these? 
> > 
> > 
> > Thanks 
> > Stephen 
> 
> ```

---

<div class="post-metadata">

**Author:** ![Justin\_Israel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/justin_israel/32/2063_2.png) [@Justin\_Israel](https://discuss.elastic.co/u/Justin_Israel)\
**Post date:** [October 9, 2013, 11:22pm UTC](https://discuss.elastic.co/t/removing-index-settings/8458/5 "2013-10-09T23:22:34Z")

</div>

I know this is an old thread, but it is most relevant to my similar  
question. I have a situation where I have discovered some problems in my  
analyzer configurations, to where I have a snowball tokenizer on the search  
query, but no snowball being applied in a specific field with a custom  
analyzer.  
My analyzers were set up like this:

```
"default": {
    "type": "custom",
    "tokenizer": "standard",
    "filter": [
        "word_delimiter_filter",
        "standard",
        "lowercase",
        "stop",
        "snowball"
    ]
},

"ngram_index_analyzer": {
    "type": "custom",
    "tokenizer": "standard",
    "filter": [
        "standard",
        "lowercase",
        "ngram_filter"
    ]
}

```

The specific field using the ngram looks like this:

```
"keywords": {
    "index_name": "keyword",
    "type": "multi_field",
    "fields": {
        "keywords": {
            "index_analyzer": "ngram_index_analyzer",
            "type": "string"
        },
        "untouched": {
            "type": "string",
            "index": "not_analyzed"
        }
    }
},

```

I realize its going to look obviously wrong, which is why I am trying to  
find the best way to fix it on a live production index

So searching for something like "body" was tokenizing to "bodi" and not  
matching on the field using the ngram\_index\_analyzer. My thought was to  
remove the "snowball" filter from the default analyzer. I discovered in  
testing that you can't remove the field, but rather can only overwrite it  
with a new value (which made me thing maybe I could just replace it with  
another stop filter).But then the information in this thread did made me  
realize that it would potentially screw up existing data tokenized via  
snowball.

@Clinton, is that suggestion about creating another index with an adjusted  
mapping, and using an alias relevant to my problem? Or is there a better  
way to adjust for bad search analyzer settings on a live index?

On Thursday, July 19, 2012 12:38:09 PM UTC+12, Stephen Beeson wrote:

> I have a configuration yml file that I am using to specify the analyzers  
> that I am using to index our documents. This is working fine, however if I  
> remove settings from the yml file, after updating elasticsearch, they are  
> still there.
> 
> Is there a mechanism for removing individual properties from an indexes  
> settings?
> 
> As an example, if I have set a number of filters, I see properties like so:  
> "index.analysis.analyzer.my\_analyzer.filter.0" : "my\_stop\_words",  
> "index.analysis.analyzer.my\_analyzer.filter.1" : "my\_stemmer",
> 
> If I remove my\_stemmer from the set of filters and update my settings the  
> entry "index.analysis.analyzer.my\_analyzer.filter.1" remains.
> 
> Is there a way to remove these?
> 
> Thanks  
> Stephen

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:13am UTC](https://discuss.elastic.co/t/removing-index-settings/8458/6 "2017-07-06T02:13:09Z")

</div>


