Jump to content

News/2020 Toolforge Elasticsearch v7 migration

From Wikitech
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

What is changing?

  • New Elasticsearch cluster version (v7.4)
  • New client connection URL: http://elasticsearch.svc.tools.eqiad1.wikimedia.cloud
  • Improved service availability and scaling capabilities

Timeline

  • 2020-03-04: Version 7 Elasticsearch cluster general availability for migration on an opt-in basis.
  • 2020-04-06: deadline Evaluate if all tools have been migrated to the new Elasticsearch cluster.
  • 2020-04-20: shutdown All tools are fully migrated to the new Elasticsearch cluster, version 5 cluster is retired from service.

What should I do?

Update client connection strings

A new service address (http://elasticsearch.svc.tools.eqiad1.wikimedia.cloud) has been configured for the Elasticsearch V7 cluster. This service address is configured to provide high availability and load-balancing features across all Elasticsearch V7 cluster members.

Update your Tools support Elasticsearch version 7 APIs

Deprecated index document types

The ability to specify a custom document type has been deprecated in Elasticsearch version 7. A full list of mapping changes can be found at https://www.elastic.co/guide/en/elasticsearch/reference/7.x/breaking-changes-7.0.html#breaking_70_mappings_changes

Deprecated version 5 example with a custom document type:

curl -X PUT 'http://<elasticsearch>/index_name' -d '{
   "mappings": {
     "custom_type": {
       "properties": {
         "foo": { "type": "keyword"  }
       },
     }
   }
 }'

Supported version 7 example:

curl -X PUT 'http://<elasticsearch>/index_name' -d '{
   "mappings": {
     "doc": {
       "properties": {
         "foo": { "type": "keyword"  },
       },
     }
   }
 }'

This mapping change also effects the path to your index documents.

Example index document paths

Deprecated version 5

PUT <index>/<custom type>/<id>

version 7

PUT <index>/_doc/<id>

See also