Multi-Tenant Elasticsearch Index Names
Priority
Components
Affects versions
Fix versions
Description
Attachments
demands
is a dependency of
Activity
Raven Song September 4, 2020 at 12:40 AMEdited
Test Scenario 3:
Since not clear which version should I use, so I use Elasticsearch 7.5 for test.
Test Scenario 1:
Setup remote Elasticsearch 7.5
Blacklist embedded Elasticsearch 6.5
Add com.liferay.portal.search.elasticsearch7.configuration.ElasticsearchConfiguration.config with indexNamePrefix="dxp"
Start portal
Deploy Liferay Connector to Elasticsearch 7 lpkg(Liferay DXP 7.2 GA1+ Fix Pack 2)
Go to Control Panel > Configuration > System Settings > Search > Elasticsearch 7 > Operation Mode: Remote
Reindex, go to Search admin - Field Mappings
Shutdown
Install FP8
Start ortal
Deploy 5 jars build from 7.2.x head
Connect remote ES 7.5
Since description said no need to reindex, go to Search admin - Field Mappings
After reindex:
Tibor Lipusz September 4, 2020 at 12:04 AM
They're also create automatically on DXP bundles. See the description of this ticket for the index names.
Raven Song September 3, 2020 at 11:41 PMEdited
Test Scenario 2:
Setup remote Elasticsearch 7.5
Blacklist embedded Elasticsearch 6
Start portal
Deploy Liferay Connector to Elasticsearch 7 lpkg(Liferay DXP 7.2 GA1+ Fix Pack 5)
Go to Control Panel > Configuration > System Settings > Search > Elasticsearch 7 > Operation Mode: Remote
Reindex, go to Search admin - Field Mappings
Shutdown
Install FP8
Start ortal
Deploy 5 jars build from 7.2.x head
Connect remote ES 7.5
Since description said no need to reindex, go to Search admin - Field Mappings
After reindex:
Raven Song September 3, 2020 at 11:27 PM
What is search tuning indexes and how to do search tuning indexes?
Tibor Lipusz September 3, 2020 at 11:16 PM
You're missing the search tuning indexes.
Regarding the version: 7.5 is fine, however we support up-to 7.9.x. through the Connector to Elasticsearch 7, but it doesn't make any differences in this case, so you don't need to repeat the test.
Details
Details
Assignee
Reporter
Due date
Zendesk Support
Linked Tickets
Zendesk Support

(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:
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:
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
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:
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.