Schema Migrations

When we write an application, we also write migrations for database schema and data, we use liquibase for that.

What tools/library are using for migrations ElasticSearch schema?

Migrations in what sense?

When I deploy an application on new server, everytime I must execute this query before application starts
curl -XPUT 'localhost:9200/products?pretty' -H 'Content-Type: application/json' -d'
{
"mappings": {
"doctype": {
"properties": {
"title": {
"type": "text"
}
}
},
"queries": {
"properties": {
"query": {
"type": "percolator"
}
}
}
}
}'

So, i am asking is there a tool where I can put this schema and run this schema if application is first time running

Are you saying you are deploying to a new cluster? Or the same one?

Also we call schema's mappings :slight_smile:

Which language are you using to develop your application?

For example I am deploying an application locally as developer on my machine, application uses elasticsearch, but before adding some data I need to execute that query
So, I want to add that query to some files, so, when another developer will deploy application on his machine, that query will be executed automatilly

Java

Have a look at: https://github.com/dadoonet/elasticsearch-beyonder

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.