Changing tokenizer


(Mike Jones) #1

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
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/23016ef1-736b-490f-8748-fd24f1c8e743%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Itamar Syn-Hershko) #2

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 | @synhershko https://twitter.com/synhershko
Freelance Developer & Consultant
Author of RavenDB in Action http://manning.com/synhershko/

On Wed, Sep 3, 2014 at 3:34 PM, Mike Jones 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
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.
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?utm_medium=email&utm_source=footer
.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAHTr4Zt9xzMKdxigwcNYQNdLqorjv7rG%3DqgO9zeWeq_FTSkvBA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(system) #3