...
Elasticsearch-py 5.0.0+ requires changing from using the
create
toindex
API call (see: https://github.com/elastic/elasticsearch-py/issues/474#issuecomment-256903012 )The docs for elasticsearch-py indicate that you must use a matching major version. And in my testing, that’s true – or at least, that the surrounding changes in our own code (renamed parameters, etc) don’t work with both server versions.
Old (server) release notes, each with breaking changes listed: https://www.elastic.co/guide/en/elasticsearch/reference/index.html
Migration helper plugin for server for 1->2 and 2->5: https://github.com/elastic/elasticsearch-migration
Only warning for 1->2 upgrade locally: “Boolean fields will return
1/0
instead ofT/F
in scripts, aggregations, or sort values, in fields:modelresult:has_enrollable_paid_seats
,modelresult:has_enrollable_seats
,modelresult:hidden
,modelresult:hidden_exact
,modelresult:is_current_and_still_upgradeable
,modelresult:is_program_eligible_for_one_click_purchase
,modelresult:mobile_available
,modelresult:mobile_available_exact
,modelresult:published
,modelresult:published_exact
.” – we need to see if we rely on old behavior anywhereOnly warning for 2->5 upgrade locally: “Indices created before v2.0.0 must be reindexed” – which means we must upgrade to 2.x, reindex, then upgrade to 5.x.
While beta versions of django-haystack 3.0 do support ES 5.x, drf-haystack (used by Discovery at least) requires the 2.8.x version of django-haystack. So we’d also need to get them to release a beta (and they are light on maintainers).
Upgrade plan
Get server ready
...