ElasticSearch upgrade for v0.x

We need to update to a newer ElasticSearch version (7.17) on the v0.x branch. The breaking changes can be found here. In practice this means the following tasks:

  • Update our docker files to use the newer version
  • Update the DSL version
  • Update our mapping to conform to the new version:
    • ES 7 has removed mapping types: we need to simply remove these from our mapping: they are not used for identifying any resources (e.g. the index already tells if we are targeting materials or entries).
  • Update any deprecated DSL calls/response handling:
    • hits.total is now an object
    • hits.total is now by default accurately tracking hits only up to 10 000 items. To enable tracking all search results, we need to provide the option track_total_hits=True.
    • elasticsearch_dsl.utils.AttrDict is no longer considered a valid dict type by pydantic, must call .to_dict()
    • The call signature for the scroll API has changed: you now have to provide scroll_id within a request body.
Edited Mar 18, 2022 by Lauri Himanen
Assignee Loading
Time tracking Loading