# Changing tokenizer

**URL:** <https://discuss.elastic.co/t/changing-tokenizer/19590>\
**Category:** Elasticsearch\
**Created:** [September 3, 2014, 12:34pm UTC](https://discuss.elastic.co/t/changing-tokenizer/19590 "2014-09-03T12:34:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Jones](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@Mike\_Jones](https://discuss.elastic.co/u/Mike_Jones)\
**Post date:** [September 3, 2014, 12:34pm UTC](https://discuss.elastic.co/t/changing-tokenizer/19590/1 "2014-09-03T12:34:50Z")

</div>

Hi,

I'm using the PHP library of ES to store and query my data. Currently I'm  
just indexing data like so, without any manual definitions for tokenizers.

```
$params['body'] = array(
        'userid' => 3 ,
        'username' => 'frank' ,
        'postname' => 'hello_world' ,
        'likes' => 33 ,
        'created_at'=> '2014-12-12' ,
        'data' => array(
            'item1' => array(
                'type' => 'tweet' ,
                'order' => '1' ,
                'id' => '32343' ,
                'created_at'=> '2014-12-12' ,
                'text' => 'blah from twitter' ,
                'latitude' => '45' ,
                'longitude' => '23'
            )
        )
    );

```

$ret = $client-\>index($params);

I don't actually know which tokenizers I want right now, so if I add them  
later, will the data need to be re-indexed?

Also, reading  
[http://www.elasticsearch.org/guide/en/elasticsearch/client/php-api/current/\_index\_operations.html](http://www.elasticsearch.org/guide/en/elasticsearch/client/php-api/current/_index_operations.html)  
do I need to include the tokenizers with the $param array for every ingest  
process? or can this be set up when I create a new index?

Thanks

--  
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/23016ef1-736b-490f-8748-fd24f1c8e743%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/23016ef1-736b-490f-8748-fd24f1c8e743%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Itamar\_Syn\_Hershko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itamar_syn_hershko/32/725_2.png) [@Itamar\_Syn\_Hershko](https://discuss.elastic.co/u/Itamar_Syn_Hershko)\
**Post date:** [September 3, 2014, 10:12pm UTC](https://discuss.elastic.co/t/changing-tokenizer/19590/2 "2014-09-03T22:12:11Z")

</div>

You will need to reindex to another index (as this change of mappings isn't  
backwards compatible) or to a field with a different name.

--

Itamar Syn-Hershko  
[http://code972.com](http://code972.com) | @synhershko [https://twitter.com/synhershko](https://twitter.com/synhershko)  
Freelance Developer & Consultant  
Author of RavenDB in Action [http://manning.com/synhershko/](http://manning.com/synhershko/)

On Wed, Sep 3, 2014 at 3:34 PM, Mike Jones [mikej@culturenetcymru.com](mailto:mikej@culturenetcymru.com)  
wrote:

> Hi,
> 
> I'm using the PHP library of ES to store and query my data. Currently I'm  
> just indexing data like so, without any manual definitions for tokenizers.
> 
> ```
> $params['body'] = array(
> 'userid' => 3 ,
> 'username' => 'frank' ,
> 'postname' => 'hello_world' ,
> 'likes' => 33 ,
> 'created_at'=> '2014-12-12' ,
> 'data' => array(
> 'item1' => array(
> 'type' => 'tweet' ,
> 'order' => '1' ,
> 'id' => '32343' ,
> 'created_at'=> '2014-12-12' ,
> 'text' => 'blah from twitter' ,
> 'latitude' => '45' ,
> 'longitude' => '23'
> )
> )
> );
> 
> ```
> 
> $ret = $client-\>index($params);
> 
> I don't actually know which tokenizers I want right now, so if I add them  
> later, will the data need to be re-indexed?
> 
> Also, reading  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/client/php-api/current/_index_operations.html)  
> do I need to include the tokenizers with the $param array for every ingest  
> process? or can this be set up when I create a new index?
> 
> Thanks
> 
> --  
> 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/23016ef1-736b-490f-8748-fd24f1c8e743%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/23016ef1-736b-490f-8748-fd24f1c8e743%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/23016ef1-736b-490f-8748-fd24f1c8e743%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/23016ef1-736b-490f-8748-fd24f1c8e743%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> 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/CAHTr4Zt9xzMKdxigwcNYQNdLqorjv7rG%3DqgO9zeWeq\_FTSkvBA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHTr4Zt9xzMKdxigwcNYQNdLqorjv7rG%3DqgO9zeWeq_FTSkvBA%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:04am UTC](https://discuss.elastic.co/t/changing-tokenizer/19590/3 "2017-07-06T01:04:29Z")

</div>


