# Changing analyzer filters

**URL:** https://discuss.elastic.co/t/changing-analyzer-filters/16688
**Category:** Elasticsearch
**Created:** [March 28, 2014, 8:55pm UTC](https://discuss.elastic.co/t/changing-analyzer-filters/16688 "2014-03-28T20:55:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Rafael\_Almeida](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rafael_almeida/32/1345_2.png) [@Rafael\_Almeida](https://discuss.elastic.co/u/Rafael_Almeida)
#### Post date: [March 28, 2014, 8:55pm UTC](https://discuss.elastic.co/t/changing-analyzer-filters/16688/1 "2014-03-28T20:55:09Z")

</div>

Hello,

I had the following analyzer on my elasticsearch configuration:

```
teste:
            type: custom
            tokenizer: standard
            filter: [standard]

```

A field named title uses that analyzer. I indexed ATLÉTICO using it.  
Searching for ATLÉTICO works. Searching for atletico gives me no result.  
Afterwards, I stoped elasticsearch and changed the analyzer to

```
teste:
            type: custom
            tokenizer: standard
            filter: [lowercase_pt, asciifolding, standard]

```

in the configuration file. Now, without reindexing anything, I searched for  
"atletico" and the document was returned. That looks odd to me. Was the  
document reindexed automatically? How did the query work? I used query  
string to search for it and I specified that analyzer on it.

[]'s  
Rafael

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKCnWVn9gG8LiakK5%2BE454RZX26aAJvxeQW7biBzjPGMbop4hw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKCnWVn9gG8LiakK5%2BE454RZX26aAJvxeQW7biBzjPGMbop4hw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [March 29, 2014, 8:08am UTC](https://discuss.elastic.co/t/changing-analyzer-filters/16688/2 "2014-03-29T08:08:38Z")

</div>

Was the document reindexed automatically?  
No.

It's hard to tell more without a full curl recreation with all the steps you did.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 28 mars 2014 à 21:55, Rafael Almeida [almeidaraf@gmail.com](mailto:almeidaraf@gmail.com) a écrit :

Hello,

I had the following analyzer on my elasticsearch configuration:

```
teste:
            type: custom
            tokenizer: standard
            filter: [standard]

```

A field named title uses that analyzer. I indexed ATLÉTICO using it. Searching for ATLÉTICO works. Searching for atletico gives me no result. Afterwards, I stoped elasticsearch and changed the analyzer to

```
teste:
            type: custom
            tokenizer: standard
            filter: [lowercase_pt, asciifolding, standard]

```

in the configuration file. Now, without reindexing anything, I searched for "atletico" and the document was returned. That looks odd to me. Was the document reindexed automatically? How did the query work? I used query string to search for it and I specified that analyzer on it.

## []'s Rafael

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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKCnWVn9gG8LiakK5%2BE454RZX26aAJvxeQW7biBzjPGMbop4hw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKCnWVn9gG8LiakK5%2BE454RZX26aAJvxeQW7biBzjPGMbop4hw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/49E60D10-E0D0-4221-9BD0-C75B4E7BE887%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/49E60D10-E0D0-4221-9BD0-C75B4E7BE887%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Rafael\_Almeida](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rafael_almeida/32/1345_2.png) [@Rafael\_Almeida](https://discuss.elastic.co/u/Rafael_Almeida)
#### Post date: [March 31, 2014, 2:11pm UTC](https://discuss.elastic.co/t/changing-analyzer-filters/16688/3 "2014-03-31T14:11:03Z")

</div>

Right. Let me elaborate my question, then.

This is my analyzer at first:

```
        test:
            type: custom
            tokenizer: standard
            filter: [standard]

```

$ curl -XPUT '[http://localhost:1980/t](http://localhost:1980/t)';echo  
{"ok":true,"acknowledged":true}  
$ curl -XPUT '[http://localhost:1980/t/t/\_mapping](http://localhost:1980/t/t/_mapping)' -d'{"t": {"properties":  
{"title": {"type":"string", "analyzer": "test"}}}}';echo  
{"ok":true,"acknowledged":true}  
$ curl -XPOST '[http://localhost:1980/t/t/1](http://localhost:1980/t/t/1)' -d'{"title": "ATLETICO"}';echo  
{"ok":true,"\_index":"t","\_type":"t","\_id":"1","\_version":1}  
$ curl -XPOST '[http://localhost:1980/t/\_search?pretty](http://localhost:1980/t/_search?pretty)' -d'{"query":  
{"query\_string": {"fields": ["title"], "query": "ATLETICO",  
"analyzer":"test"}}}';echo  
{  
"took" : 44,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 1,  
"successful" : 1,  
"failed" : 0  
},  
"hits" : {  
"total" : 1,  
"max\_score" : 0.30685282,  
"hits" : [ {  
"\_index" : "t",  
"\_type" : "t",  
"\_id" : "1",  
"\_score" : 0.30685282, "\_source" : {"title": "ATLETICO"}  
} ]  
}  
}  
$ curl -XPOST '[http://localhost:1980/t/\_search?pretty](http://localhost:1980/t/_search?pretty)' -d'{"query":  
{"query\_string": {"fields": ["title"], "query": "atletico",  
"analyzer":"test"}}}';echo  
{  
"took" : 2,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 1,  
"successful" : 1,  
"failed" : 0  
},  
"hits" : {  
"total" : 0,  
"max\_score" : null,  
"hits" : []  
}  
}

So far so good. Now I changed my analyzer to this (and restarted  
elasticsearch):

```
        test:
            type: custom
            tokenizer: standard
            filter: [lowercase, standard]

```

Now that last query returns a result:

$ curl -XPOST '[http://localhost:1980/t/\_search?pretty](http://localhost:1980/t/_search?pretty)' -d'{"query":  
{"query\_string": {"fields": ["title"], "query": "atletico",  
"analyzer":"test"}}}';echo  
{  
"took" : 45,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 1,  
"successful" : 1,  
"failed" : 0  
},  
"hits" : {  
"total" : 1,  
"max\_score" : 0.30685282,  
"hits" : [ {  
"\_index" : "t",  
"\_type" : "t",  
"\_id" : "1",  
"\_score" : 0.30685282, "\_source" : {"title": "ATLETICO"}  
} ]  
}  
}

What's happening?

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKCnWVn%3DhD30h8nEzw4fWxbqGcqD%3DAX%2BiJhg%3D%3D%2BSroXb%2BzRcag%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKCnWVn%3DhD30h8nEzw4fWxbqGcqD%3DAX%2BiJhg%3D%3D%2BSroXb%2BzRcag%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:39am UTC](https://discuss.elastic.co/t/changing-analyzer-filters/16688/4 "2017-07-06T01:39:22Z")

</div>


