Index Mappings


(quain) #1

Hi,
I'm reading the document about Mappings here
(http://www.elasticsearch.org/guide/reference/api/admin-indices-create-index.html).
Is there a way to define a mapping/properties for every type in an index?
For example, for all types in index x, I want to have a field called "name"
that have the same properties across the board. Is there a way to specify
that?

Thanks.


(Lukáš Vlček) #2

Hi,

I think you can use index templates:
http://www.elasticsearch.org/guide/reference/api/admin-indices-templates.html
Note the last example on the above docs page where the 'default' is used
to match any type.

You can also take a look at
http://www.elasticsearch.org/guide/reference/mapping/conf-mappings.html
http://www.elasticsearch.org/guide/reference/mapping/dynamic-mapping.html

Regards,
Lukas

On Thu, Apr 5, 2012 at 12:51 AM, quain quaintenance@gmail.com wrote:

Hi,
I'm reading the document about Mappings here (
http://www.elasticsearch.org/guide/reference/api/admin-indices-create-index.html).
Is there a way to define a mapping/properties for every type in an index?
For example, for all types in index x, I want to have a field called "name"
that have the same properties across the board. Is there a way to specify
that?

Thanks.


(system) #3