Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-7739

System properties and non string values could use EQUALS instead of LIKE in JCR query

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Neutral
    • 6.3.0, 6.2.29
    • 6.2.27
    • None
    • None

    Description

      Steps to reproduce

      1. Go to https://nightly.magnolia-cms.com/.magnolia/admincentral#app:pages-app:browser
      2. Filter via page template dropdown
      3. Inspect/debug the constructed JCR query performance/timing

      Expected results

      SELECT * FROM [nt:base] AS t WHERE ISDESCENDANTNODE(t, [/]) AND t.[jcr:primaryType] = 'mgnl:page' AND LOWER(t.[mgnl:template]) = 'mtk2:pages/basic' AND LOWER(t.title) LIKE '%test%' AND LOWER(LOCALNAME(t)) LIKE '%test%'

      Actual results

      SELECT * FROM [nt:base] AS t WHERE ISDESCENDANTNODE(t, [/]) AND t.[jcr:primaryType] = 'mgnl:page' AND LOWER(t.[mgnl:template]) LIKE '%mtk2:pages/basic%' AND LOWER(t.title) LIKE '%test%' AND LOWER(LOCALNAME(t)) LIKE '%test%'

      Workaround

      Development notes

      JcrQueryBuilder doesn't know about the source field (was it textField or a comboBoxField) but one can assume any system property (prefixed with mgnl:) should be search by equality, therefore the usage of LIKE is redundant.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                ajuran Antonín Juran
                ajuran Antonín Juran
                Nucleus
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Work Started:

                  Checklists

                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Remaining Estimate - Not Specified
                      Not Specified
                      Logged:
                      Time Spent - 1d
                      1d