-
Type:
Epic
-
Status: Closed
-
Priority:
Minor
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: 7.2.10 DXP FP8, 7.2.10.3 DXP SP3, 7.3.10 DXP GA1
-
Component/s: Search Infrastructure, Workflow
-
Epic Status:In Progress
(On Elastic Stack only.)
Liferay Company (Virtual Instance) indexes:
<customer_defined_prefix>-<companyId>
Application contributed indexes:
<customer_defined_prefix>[<companyId>][-<application_defined_index_name>]
Definitions
- <customer_defined_prefix>
is determined by the "indexNamePrefix" property of the Elasticsearch 6/7 connector configuration. Defaults to "liferay". - <companyId> is the "companyId" of the given Company in the database. It is displayed as "Instance ID" in the UI and represents the Virtual Instance.
- -<application_defined_index_name> is defined by the application's developer.
Background
What is a multi-tenant Liferay DXP-Elasticsearch stack?
A DXP-Elasticsearch stack is multi-tenant if a single Elasticsearch cluster hosts the indexes of multiple DXP deployments. These deployments can be different production deployments or different environments of the same deployment.
Multi-tenancy in Liferay DXP 7.2 prior to SP3/FP8
Multi-tenant DXP 7.2-Elasticsearch deployments are not supported prior to the DXP 7.2 SP3/FP8 patch level.
Read more about this topic and the related changes in the Help Center.
Multi-tenancy in Liferay DXP 7.3
The necessary changes will be included in DXP 7.3 GA1.
Verification
DXP 7.3 GA1 out-of-the-box index names
Assuming there is only one Virtual Instance (aka. company) and you are using the default "indexNamePrefix" Elasticsearch connector configuration, the index names look like these on a vanilla installation:
liferay-0 liferay-<companyId> liferay-<companyId>-search-tuning-rankings liferay-<companyId>-search-tuning-synonyms liferay-<companyId>-workflow-metrics-instances liferay-<companyId>-workflow-metrics-nodes liferay-<companyId>-workflow-metrics-processes liferay-<companyId>-workflow-metrics-sla-instance-results liferay-<companyId>-workflow-metrics-sla-task-results liferay-<companyId>-workflow-metrics-tasks liferay-<companyId>-workflow-metrics-transitions
DXP 7.2 SP3+/FP8+ out-of-the-box index names
Assuming there is only one Virtual Instance (aka. company) and you are using the default "indexNamePrefix" Elasticsearch connector configuration, the index names look like these on a vanilla installation:
liferay-0 liferay-<companyId> liferay-<companyId>-search-tuning-rankings liferay-<companyId>-search-tuning-synonyms liferay-<companyId>-workflow-metrics-instances liferay-<companyId>-workflow-metrics-nodes liferay-<companyId>-workflow-metrics-processes liferay-<companyId>-workflow-metrics-sla-process-results liferay-<companyId>-workflow-metrics-sla-task-results liferay-<companyId>-workflow-metrics-tokens
Test Scenarios
1. Moving to DXP 7.2 SP3+/FP8+ patch level from SP1/FP2
Use case: same as below, but instead of doing an upgrade, install DXP 7.2 FP? and no need to reindex.
Expected index names on the new patch level: see the "DXP 7.2 SP?/FP? out-of-the-box index names" section above.
2. Moving to DXP 7.2 SP3+/FP8+ patch level from SP2/FP5
Use case: same as below, but instead of doing an upgrade, install DXP 7.2 FP? and no need to reindex.
Expected index names on the new patch level: see the "DXP 7.2 SP?/FP? out-of-the-box index names" section above.
3. Moving to DXP 7.2 SP3+/FP8+ patch level from SP1/FP2 using custom "indexNamePrefix"
Use case: same as below, but instead of doing an upgrade, install DXP 7.2 FP? and no need to reindex.
Configure "indexNamePrefix" as "dxp" in "com.liferay.portal.search.elasticsearch7.configuration.ElasticsearchConfiguration.config".
The new indexes should be prefixed with "dxp".
Expected index names on the new patch level: see the "DXP 7.2 SP3+/FP8+ out-of-the-box index names" section above.
4. Moving to DXP 7.2 SP3+/FP8+ patch level from SP2/FP5 using custom "indexNamePrefix"
Use case: same as below, but instead of doing an upgrade, install DXP 7.2 FP? and no need to reindex.
Configure "indexNamePrefix" as "dxp" in "com.liferay.portal.search.elasticsearch7.configuration.ElasticsearchConfiguration.config".
The new indexes should be prefixed with "dxp".
Expected index names on the new patch level: see the "DXP 7.2 SP3+/FP8+ out-of-the-box index names" section above.
5. Same as 1-4, but using Elasticsearch 6.8.x
Expected index names on the new patch level: see the "DXP 7.2 SP3/FP8+ out-of-the-box index names" section above.
6. Upgrading from DXP 7.2 SP2 with Elasticsearch 7
- Configure 7.2 SP2 with remote ES7 7.3.x-7.7.x (use v3.0.1 of the connector)
- Start Liferay, reindex indexes & spell-check indexes as usual
- Enable Single Approval workflow for Web Content Articles
- Create a test SLA (Start: Process Begins, Stop: Process Ends: Approved, 1day )
- Create 2 articles, submit for publication and then approve and reject 1-1 by the Test Test user
- Create a Synonym Set: "liferay", "company"
- Create a Result Rankings entry with query "DXP"
- Create a new Virtual Instance
- Log in to the new instance and repeat the same, but create articles, synonyms and rankings with different keywords
- Go to Search admin - Field Mappings and copy the available liferay index names, like
liferay-0 liferay-20101 liferay-34957 liferay-search-tuning-rankings liferay-search-tuning-synonyms-liferay-20101 liferay-search-tuning-synonyms-liferay-34957 workflow-metrics-instances workflow-metrics-nodes workflow-metrics-processes workflow-metrics-sla-process-results workflow-metrics-sla-task-results workflow-metrics-tokens
- Stop Liferay
- Point the your Master/7.3 bundle and the DB Upgrade Client tool to the 7.2 SP2 database & perform an upgrade
- Configure 7.3 bundle to connect to the same remote ES7 server
- Start Liferay
- Perform a reindex
- Visit Synonym Sets, Result Rankings and Workflow Metrics at both virtual instances & verify that the data are there
- Go to Search admin - Field Mappings and verify that there are the following liferay indexes are available:
liferay-0 liferay-20101 liferay-20101-search-tuning-rankings liferay-20101-search-tuning-synonyms liferay-20101-workflow-metrics-instances liferay-20101-workflow-metrics-nodes liferay-20101-workflow-metrics-processes liferay-20101-workflow-metrics-sla-instance-results liferay-20101-workflow-metrics-sla-task-results liferay-20101-workflow-metrics-tasks liferay-20101-workflow-metrics-transitions liferay-34957 liferay-34957-search-tuning-rankings liferay-34957-search-tuning-synonyms liferay-34957-workflow-metrics-instances liferay-34957-workflow-metrics-nodes liferay-34957-workflow-metrics-processes liferay-34957-workflow-metrics-sla-instance-results liferay-34957-workflow-metrics-sla-task-results liferay-34957-workflow-metrics-tasks liferay-34957-workflow-metrics-transitions
Note: if you are testing on 7.2, the name of the workflow metrics indexes will be different, we expect to find indexes with names described in the "DXP 7.2 SP3+/FP8+ out-of-the-box index names" section above.
7. Upgrading from DXP 7.2 SP? with Elasticsearch 7
Same as 6).
Related Resources.
See in a comment below.
- demands
-
COMMERCE-4402 Implement changes to comply with multitenancy requirements for ML modules
-
- Ready for Review
-
- is a dependency of
-
LPS-117720 Multi-Tenant index names (Phase 2)
-
- Open
-
- is related to
-
LPS-100272 Reindexing search indices deletes all Synonym Sets
- Closed
-
LPS-101291 Results Rankings index should be per virtual instance, not shared
- Closed
-
LPS-108828 As a Portal Admin, I want Workflow Metrics to create an index per company
-
- Closed
-