From what I can see, one a field has been assigned a type (either
explicitly with create_mapping or automatically by indexing a
document) it is immutable. Even updating the mapping won't change
that field type.
Will it be possible to change the field type with create_mapping in
the future?
If not, then will it be possible to rename indices or types?
For example:
I create_mapping with { foo: { type: "string" }}
later I want to change it to { foo: {type: "int" }}
but I still want my current index 'my_index' available while I
generate a new index 'new_my_index'
once the new index is up to date, i want to drop the old index,
and rename the new one to 'my_index'
Changing the type of a field will probably not be supported in the future.
Basically, it requires complete reindexing of the system.
What I do plan to provide is the ability to get one index, and completely
reindex it into another index. Since we have the source json for each
document, we can do that. So you should be able to create a new index,
create mappings to it, and then reindex.
Until that feature is done, I am working on a simpler feature allowing to
execute a search query and scroll it (you get a scroll id back, and continue
scrolling with it until exhausted). When you have that, you can implement
reindexing yourself.
From what I can see, one a field has been assigned a type (either
explicitly with create_mapping or automatically by indexing a
document) it is immutable. Even updating the mapping won't change
that field type.
Will it be possible to change the field type with create_mapping in
the future?
If not, then will it be possible to rename indices or types?
For example:
I create_mapping with { foo: { type: "string" }}
later I want to change it to { foo: {type: "int" }}
but I still want my current index 'my_index' available while I
generate a new index 'new_my_index'
once the new index is up to date, i want to drop the old index,
and rename the new one to 'my_index'
What I do plan to provide is the ability to get one index, and
completely reindex it into another index. Since we have the source
json for each document, we can do that. So you should be able to
create a new index, create mappings to it, and then reindex.
OK great - at the end of the process, will we be able to drop the old
index and rename the new one?
Otherwise it means making changes to an application, or using versioned
index names
ta
clint
Web Announcements Limited is a company registered in England and Wales,
with company number 05608868, with registered address at 10 Arvon Road,
London, N5 1PR.
What I do plan to provide is the ability to get one index, and
completely reindex it into another index. Since we have the source
json for each document, we can do that. So you should be able to
create a new index, create mappings to it, and then reindex.
OK great - at the end of the process, will we be able to drop the old
index and rename the new one?
Otherwise it means making changes to an application, or using versioned
index names
ta
clint
Web Announcements Limited is a company registered in England and Wales,
with company number 05608868, with registered address at 10 Arvon Road,
London, N5 1PR.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.