Uploaded image for project: 'Magnolia Templating Essentials'
  1. Magnolia Templating Essentials
  2. MTE-42

Searching below root path '/' will result in no results

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • 0.5
    • None
    • None

    Description

      When using SearchTemplatingFunctions#searchContent(String, String, String, String)
      with the following settings: ("educations", antropologie, "/", mgnl:education), the results are always 0.

      The query which is internally used by the searchContent method is:
      SELECT rep:excerpt() from mgnl:education WHERE jcr:path like '//%' AND contains(., 'antropologie') ORDER BY jcr:score() DESC

      The problem is the "like '//%' " part. When changing it to "like '/%' ", it's working.

      E.g. SELECT rep:excerpt() from mgnl:education WHERE jcr:path like '/%' AND contains(., 'antropologie') ORDER BY jcr:score() DESC

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                jdiepeveen Jordie Diepeveen
                Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD