Zammad update needs elasticsearch updates which needs reindex

Infos:

  • Used Zammad version: zammad-5.0.3-1646129126.fba5cdc8.centos7.x86_64
  • Used Zammad installation type: rpm package
  • Operating system: CentOS 7

I’ve upgraded our zammad setup this morning. However it looks like this new version of zammad is not compatible with the elasticsearch 6 that I’m running on this server. It refers to the documentation which only states how to install elasticsearch 7. I tried to upgrade to elasticsearch 7, however that fails because the indices that are in this setup were created by the elasticsearch 5 back then.

I read up and prepared reindexing of the zammad indices, however there are two strange things happening:

  1. Reindexation of tickets results in much less documents in the elasticsearch:

  2. reindex of the index zammad_production is not working at all due to the error that from elasticsearch 6 onwards it’s only possible to have one type.
    “type” : “illegal_argument_exception”,
    “reason” : “Rejecting mapping update to [zammad_production-reindex] as the final mapping would have more than 1 type: [KnowledgeBase::Translation, Ticket]”

It seems like the command zammad run rake searchindex:rebuild does only reindex a part of the used indices. Is there some other possibility from within zammad to move the indices to the next version? Maybe I could downgrade zammad again and further use the zammad commands which at the moment state:
rake aborted!
Version 6.8.23 of configured elasticsearch is not supported.

What would be the steps needed to fix this?

Update Elasticsearch to a version that is supported as mentioned in the documentation?

i’ve seen this also in my upgrade process.
i went back to zammad 4 with elastic 6.

Elastic7 wont start because the indecies are from an older elasticsearch.

You have to follow specific update paths as stated in our documentation.
Here’s the direct Elasticsearch URL for those that oversee it in our documentation:

Follow that path and you’ll be good to go.

Thnx, this will help me too.

So I found the upgrade guide from elasticsearch beforehand. However it does not handle the case when there are multiple types. So could you please be more precise on how to upgrade the zammad elasticsearch data from elasticsearch 6 to 7?

Another question: Is all the data stored in the postgres database as well? So could I use a completely new elasticsearch instance and reindex from the database?

Regards,
Andi

Elasticsearch is optional, so that will work. zammad run rake zammad:searchindex:rebuild will recreate indices and pipelines.

1 Like

elasticsearch is something that really helped me. I removed the elasticsearch 6 index, installed elasticsearch 7 for now and I’m rebuilding the index as of now. Thank you.