Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-101291

Results Rankings index should be per virtual instance, not shared

    Details

      Description

      Steps to reproduce - Single deployment scenario

      1. Navigate to Control Panel > Search Tuning > Results Ranking
      2. Add a Results Ranking with the Example query
      3. Create a new Virtual Instance
      4. Navigate to Virtual Instance and login
      5. Navigate to Control Panel > Search Tuning > Results Ranking

      Expected Result: The Results Ranking created in Step 2 shouldn't show up.

      Actual Result: The Results Ranking created in Step 2 does show up.

      Tested on:
      Tomcat 9.0.17 + MySQL 5.7
      Portal master-private SHA: bde67ee189e438bb57d8ceef095e82cf9e423fad
      Portal 7.2.x-private SHA: 570fd31ff0fb47548c841ac0fd386849bdc3ac92

      Steps to reproduce - Multi-tenant deployment scenario

      Assumptions, facts:

      • Elasticsearch is multi-tenant: it can host multiple indexes
      • Liferay's Elasticsearch integration leverages multi-tenancy since each Virtual Instance has its own index
      • The name of the indexes for the Virtual Instances can be prefixed through the Elasticsearch 6 connector's System Settings ("Index Name Prefix")
      • Liferay/DXP can be configured to operate on "deployment data centers" so the Counter will generate values without fear of collision (for example for the company ID)
      1. Unpack 2 DXP 7.2 SP1 (or master-private/7.2.x-private) bundles (let's refer to them as "prod" and "uat")
      2. Configure Elasticsearch 6.8.x to use "LiferayElasticsearchCluster" as cluster name (elasticsearch.yml) and start it
      3. Configure the Elasticsearch 6 connector on the "prod" server like this:
        prod/osgi/configs/com.liferay.portal.search.elasticsearch6.configuration.ElasticsearchConfiguration.config
        operationMode="REMOTE"
        indexNamePrefix="prod-"
        
      4. Configure "prod" to connect to to its own DB (db-prod)
      5. Start "prod" ad perform a reindex
        Verify - prod that multiple indexes are created through the Control Panel - Configuration - Search - Field Mappings under "INDEX", something like
        prod-0
        prod-20096
        prod-20101
        liferay-results-rankings
        ...
        
      6. Add an arbitrary content, for example Web Content Article
      7. Go to Control Panel - Search Tuning - Result Rankings on "prod" and create an arbitrary ranking entry (let's call it "dxp") pinning that article you just created
      8. Configure "uat" Tomcat to run on different ports
      9. Configure the Elasticsearch 6 connector on the "uat" server like this:
        uat/osgi/configs/com.liferay.portal.search.elasticsearch6.configuration.ElasticsearchConfiguration.config
        operationMode="REMOTE"
        indexNamePrefix="uat-"
        
      10. Configure "uat" to connect to to its own DB (db-uat)
      11. Configure Counter for "uat" like this:
        uat/portal-ext.properties
        counter.data.center.count=2
        counter.data.center.deployment.id=1
        
      12. Start "uat" ad perform a reindex
        Verify - uat that multiple indexes are created through the Control Panel - Configuration - Search - Field Mappings under "INDEX", something like
        uat-0
        uat-4611686018427408000
        liferay-results-rankings
        ...
        
      13. Add an arbitrary content, for example Web Content Article
      14. Go to Control Panel - Search Tuning - Result Rankings on "uat"
        Result: The "dxp" Result Rankings entry appears even though we created it on "prod"
      15. Delete the "dxp" entry
      16. Go to Control Panel - Search Tuning - Result Rankings on "prod"
        Result: The "dxp" entry is missing

      The liferay-results-rankings index is shared across the deployments.

        Attachments

          Activity

            People

            • Assignee:
              adam.brandizzi Adam Brandizzi
              Reporter:
              brian.lee Brian Lee
              Participants of an Issue:
              Recent user:
              Adam Brandizzi
              Engineering Assignee:
              Wade Cao
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                11 weeks, 4 days ago

                Packages

                Version Package