Mappings: use wildcards from field name

Hi,

Can I create a mapping and use wildcards in the fields name? For example, I
want to create a template with the following mapping:

{

"user": {

"dynamic": "false",

"properties": {

"email": { "type":"string" },

"*_metadata": {

"type": "object",

"dynamic": "true"

}

}

}

}

Then, the "foo_metadata", "bar_metadata", etc fields will be mapped.

Is it possible?

--
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/6d7d08b8-c2f2-4109-9720-c75f031092a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi,

You try to use “dynamic_templates” .
http://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-root-object-type.html#_dynamic_templates

I hope that those help you out.


Jun Ohtani
johtani@gmail.com
blog : http://blog.johtani.info
twitter : http://twitter.com/johtani

2015/02/27 2:56、sebastian sebastianos@gmail.com のメール:

Hi,

Can I create a mapping and use wildcards in the fields name? For example, I want to create a template with the following mapping:

{
"user": {
"dynamic": "false",
"properties": {
"email": { "type":"string" },
"*_metadata": {
"type": "object",
"dynamic": "true"
}
}
}
}

Then, the "foo_metadata", "bar_metadata", etc fields will be mapped.

Is it possible?

--
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/6d7d08b8-c2f2-4109-9720-c75f031092a6%40googlegroups.com.
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/772DDFF6-B4D6-4BFD-BAE8-8BDA63BB78C6%40gmail.com.
For more options, visit https://groups.google.com/d/optout.