Hi Ali,
Can you tell me how to do ignore_conflicts without using java api?
Also any insight on what will happen if I make ignore_conflicts:true?
For example: will my mapping have the same field name with two
different types if I change the type of one of my field? Also if now my data
have that field, then what type(out of those 2) will ES use to index the
new data?
Thanks in advance..!!!
ankit
On Wednesday, February 1, 2012 2:44:46 PM UTC-8, Ali Loghmani wrote:
You can add extra fields to an existing mapping, here is the code (you
can set ignore conflicts to true if you want to):new
PutMappingRequestBuilder(client.admin().indices()).setIgnoreConflicts(true).setIndices(index).setType(type).setSource(mapping).execute().actionGet();Ali
On Feb 1, 2:39 pm, "da...@pilato.fr" da...@pilato.fr wrote:
You can not update the mapping definition for an existing field.
So you will have to create a new mapping and reindex your docs.I don't know if you can merge mappings in Java...
David.
Le 1 février 2012 à 22:16, Frank LaRosa fr...@studyblue.com a écrit :
Hi,
I created an index with a mapping, in Java, using the
IndicesAdminClient.create call with a CreateIndexRequest.I added a large amount of data to my index.
Now I want to alter the mapping: I wish to add some new fields, and I
also want to change the index property of one of the existing fields.How do I accomplish this in Java? Is there a specific call to update a
mapping, or should I just re-issue the create command with the new
mapping? Will this destroy any of my old data?I realize that I will need to update all my documents, and I am
prepared to do this, but I do not want to have to remove them all
first.Thanks.
--
David Pilatohttp://dev.david.pilato.fr/
Twitter : @dadoonet
--