Update mapping of an object

Hi all,

I have a mappings defined as:

{
"mappings" : {
"person" : {
"properties" : {
"name" : { "type" : "string", "index" :
"not_analyzed" },
"location" : {
"type" : "object",
"properties" : {
"address" : {"type" : "string",
"index_analyzer" : "address" }
}
}
}
}
}
}

I would like to update the mapping to include a new property in the
"location" object, is this possible? I've been able to add a new property
under the root "person" object but not in the "person.location" object.

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.
For more options, visit https://groups.google.com/groups/opt_out.

Any info on this?

On Wednesday, February 27, 2013 2:02:21 PM UTC-8, William King wrote:

Hi all,

I have a mappings defined as:

{
"mappings" : {
"person" : {
"properties" : {
"name" : { "type" : "string", "index" :
"not_analyzed" },
"location" : {
"type" : "object",
"properties" : {
"address" : {"type" : "string",
"index_analyzer" : "address" }
}
}
}
}
}
}

I would like to update the mapping to include a new property in the
"location" object, is this possible? I've been able to add a new property
under the root "person" object but not in the "person.location" object.

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.
For more options, visit https://groups.google.com/groups/opt_out.

Hi William

I would like to update the mapping to include a new property in the
"location" object, is this possible? I've been able to add a new
property under the root "person" object but not in the
"person.location" object.

If you show us how you have added one property but failed to add the
other, then we could show you where you're going wrong.

But yes, you can add properties to a mapping, using the PUT mapping API:

clint

--
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.
For more options, visit https://groups.google.com/groups/opt_out.