Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support of ElasticSearch 6 #82

Closed
To-om opened this issue May 10, 2019 · 0 comments
Closed

Add support of ElasticSearch 6 #82

To-om opened this issue May 10, 2019 · 0 comments
Assignees
Milestone

Comments

@To-om
Copy link
Contributor

To-om commented May 10, 2019

The migration from ES5 to ES6 follows the recommendations from https://www.elastic.co/guide/en/elasticsearch/reference/6.0/removal-of-types.html. Document types are merged in "doc" document. Type information is stored in the join field, named "relations".

API doesn't change but the migration of data is needed. Data doesn't need modification except for sequences. Migration operations look like:

Seq(
  mapEntity("sequence") { seq =>
    val oldId = (seq \ "_id").as[String]
    val counter = (seq \ "counter").as[JsNumber]
    seq - "counter" - "_routing" +
      ("_id" -> JsString("sequence_" + oldId)) +
      ("sequenceCounter" -> counter)
  }
)

The migration process needs also to know if the index uses mapping type or not. This is done by implementing the MigrationOperations.indexType method.

@To-om To-om added this to the 1.11 milestone May 10, 2019
@To-om To-om self-assigned this May 10, 2019
To-om added a commit that referenced this issue May 15, 2019
To-om added a commit that referenced this issue May 15, 2019
@To-om To-om closed this as completed May 15, 2019
@To-om To-om reopened this May 23, 2019
@To-om To-om closed this as completed May 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant