[[indices]]
==== Creating an index

For this example on how to create an index, lets create an index named `test-index` and provide a mapping for the field `price` which will be an integer.
Notice how using the builder for the `IntegerNumberProperty` will automatically apply the correct value for the `type` field.

[source,go]
-----
res, err := es.Indices.Create("test-index").
    Request(&create.Request{
        Mappings: &types.TypeMapping{
            Properties: map[string]types.Property{
                "price": types.NewIntegerNumberProperty(),
            },
        },
    }).
    Do(nil)
-----
