0 Replies Latest reply on May 28, 2008 2:01 PM by Michael Scepaniak

    CMS Query - sub-directory isolation

    Michael Scepaniak Newbie

      I'm wondering if the portal CMS supports directory-specific queries. The CMS search function relies on the ...jcr.command.SearchCommand class. I took a look at the querystring it creates and see the following when I search for "jboss":
      //*[jcr:contains(., 'jboss')]
      When searching against the default portal content, this search returns more than a dozen matches, a few of which are located in the /default/images directory.

      I modified the code a bit to determine the search function's ability to constrain the results to a specified directory, like so:
      /default/images/*[jcr:contains(., 'jboss')]
      //default/images/*[jcr:contains(., 'jboss')]

      Both of these searches return zero matches. I don't have a lot of experience with XQuery/XPath, but I believe either of these queries should return several matches (e.g., back.gif, check.gif, etc.). Would someone please verify that directory-specific queries work (or don't work) in portal CMS? I don't see any unit tests demonstrating/proving this functionality.

      I'm concerned about the CMS' scalability if searches are always being performed from the root. I'd like to be able to structure the CMS so that searches can be constrained to a branch of the tree.

      JBoss Portal Version - v2.6.4 (download)
      JBoss AS Version - v4.2.2
      Database Vendor and Version - SQLServer 2005
      JDBC Connector and Version - JTDS v1.2.2
      OS Platform - Windows XP Pro SP2

      Post any modified configuration files for the portal...
      In order to test this, I had to extend some of the CMS-related classes and place them in the server\default\deploy\jboss-portal.sar\portal-cms.sar\lib directory.