elastix
elastix copied to clipboard
API to update Settings
Hey
Is there a API to update the index settings or to setup it together the mapping using Elastix?
That could be achieved with the next code:
index_config = %{
settings: %{
analysis: %{
analyzer: %{
email_field: %{
type: "custom",
tokenizer: "uax_url_email",
filter: ["lowercase", "stop"]
}
}
}
},
mappings: %{
properties: %{
id: %{type: "text", fielddata: true},
originator_email: %{type: "text", analyzer: "email_field"},
}
}
}
Elastix.Index.create("http://localhost:9200", "my-index", index_config)