Is it possible to rename a field in ES?

Suppose I create an index X with type Y and add 100,000 documents containing
a field 'foo'.

Is there a command I can use to atomically rename the field name from 'foo'
to 'bar', or would I have to reindex all 100,000 documents with the new
field name?

Thanks.

I believe you'll need to reindex.

On Fri, Sep 16, 2011 at 1:13 PM, datadev nji@adinfocenter.com wrote:

Suppose I create an index X with type Y and add 100,000 documents
containing a field 'foo'.

Is there a command I can use to atomically rename the field name from 'foo'
to 'bar', or would I have to reindex all 100,000 documents with the new
field name?

Thanks.

Yes, once a field is set, there is no way to rename it.

On Fri, Sep 16, 2011 at 10:16 PM, Dan Young danoyoung@gmail.com wrote:

I believe you'll need to reindex.

On Fri, Sep 16, 2011 at 1:13 PM, datadev nji@adinfocenter.com wrote:

Suppose I create an index X with type Y and add 100,000 documents
containing a field 'foo'.

Is there a command I can use to atomically rename the field name from
'foo' to 'bar', or would I have to reindex all 100,000 documents with the
new field name?

Thanks.

Or can I add an alias for 'foo'?

On Saturday, September 17, 2011 at 5:59:11 AM UTC+8, kimchy wrote:

Yes, once a field is set, there is no way to rename it.

On Fri, Sep 16, 2011 at 10:16 PM, Dan Young <dano...@gmail.com
<javascript:>> wrote:

I believe you'll need to reindex.

On Fri, Sep 16, 2011 at 1:13 PM, datadev <n...@adinfocenter.com
<javascript:>> wrote:

Suppose I create an index X with type Y and add 100,000 documents
containing a field 'foo'.

Is there a command I can use to atomically rename the field name from
'foo' to 'bar', or would I have to reindex all 100,000 documents with the
new field name?

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/b8eb7181-bf2c-4367-bb7c-dc3f1244765e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

You can create an alias with a filter on a field and then use that, but you
cannot alias an individual field.

On 2 April 2015 at 16:25, Johnny Wang archer.wq@gmail.com wrote:

Or can I add an alias for 'foo'?

On Saturday, September 17, 2011 at 5:59:11 AM UTC+8, kimchy wrote:

Yes, once a field is set, there is no way to rename it.

On Fri, Sep 16, 2011 at 10:16 PM, Dan Young dano...@gmail.com wrote:

I believe you'll need to reindex.

On Fri, Sep 16, 2011 at 1:13 PM, datadev n...@adinfocenter.com wrote:

Suppose I create an index X with type Y and add 100,000 documents
containing a field 'foo'.

Is there a command I can use to atomically rename the field name from
'foo' to 'bar', or would I have to reindex all 100,000 documents with the
new field name?

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/b8eb7181-bf2c-4367-bb7c-dc3f1244765e%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/b8eb7181-bf2c-4367-bb7c-dc3f1244765e%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/CAEYi1X9oo_g2T%2BnFw5ZSP2H4U6c1-6E3oUNx5b8h4AHYDvngKg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.