Add upgrade step which does the import during upgrade when the ES server is available and there are SS entries to add.
Even if we assume that some customers will set-up a new ES cluster and back-up and restore the indexes manually (after the DB upgrade, so the SS entries may not be present during the upgrade process), other customers will just re-use the existing ES 7.x cluster (especially when upgrading from 7.3) so this upgrade step will eliminate the need for running the Groovy-script and also simplify the Search upgrade docs. In addition, this would also help QA in adding an upgrade test.
Synonyms entries are stored in the Elasticsearch index only. They should be backed by SB entities so they can be restored when performing a full reindex or reindexing that entity through the Search Admin.
- Upgrade successfully from 7.2/7.3 search index storage to database storage
- Install & configure remote ES7
- Configure DXP to connect to remote ES7
- Start DXP
- Create a Synonym set "liferay,company"
- Create another Synonym set "dxp,platform"
- Create a new Virtual Instance
- Repeat steps 3-4 on the new Virtual Instance
- Stop DXP
- Stop ES7
- Set-up the environment using DXP 7.3 and follow the steps above to create data
- Stop DXP 7.3 and upgrade to Master/7.4
- Perform a full reindex
- Verify that Synonym sets are present on both Virtual Instances
- Verify that Synonym sets are present in the database
- Verify that the Synonym indexes (liferay-<companyId>-search-tuning-synonyms) contain the synonym set documents
- After upgrading from 7.3, if the ES server was not available during the upgrade or it did not contain the existing entries for whatever reason, the groovy script attached must be ran (while portal is connected to the elastic server that contains the synonyms indexes) in order to populate the database
- Storage: JSONStorageEntry table.