Details

    • Epic Status:
      In Progress

      Description

      (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

      1. Configure 7.2 SP2 with remote ES7 7.3.x-7.7.x (use v3.0.1 of the connector)
      2. Start Liferay, reindex indexes & spell-check indexes as usual
      3. Enable Single Approval workflow for Web Content Articles
      4. Create a test SLA (Start: Process Begins, Stop: Process Ends: Approved, 1day )
      5. Create 2 articles, submit for publication and then approve and reject 1-1 by the Test Test user
      6. Create a Synonym Set: "liferay", "company"
      7. Create a Result Rankings entry with query "DXP"
      8. Create a new Virtual Instance
      9. Log in to the new instance and repeat the same, but create articles, synonyms and rankings with different keywords
      10. 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
        
      11. Stop Liferay
      12. Point the your Master/7.3 bundle and the DB Upgrade Client tool to the 7.2 SP2 database & perform an upgrade
      13. Configure 7.3 bundle to connect to the same remote ES7 server
      14. Start Liferay
      15. Perform a reindex
      16. Visit Synonym Sets, Result Rankings and Workflow Metrics at both virtual instances & verify that the data are there
      17. 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.

        Attachments

        1. 3.PNG
          3.PNG
          86 kB
        2. expected.png
          expected.png
          144 kB
        3. expected-2.png
          expected-2.png
          105 kB

          Issue Links

            Activity

              People

              Assignee:
              tibor.lipusz Tibor Lipusz
              Reporter:
              andre.oliveira André Ricardo Barreto de Oliveira
              Recent user:
              Tibor Lipusz
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  7.2.10 DXP FP8
                  7.2.10.3 DXP SP3
                  7.3.10 DXP GA1