[jboss-user] [JBoss Portal] - CMS Query - sub-directory isolation

hispanic do-not-reply at jboss.com
Wed May 28 14:01:54 EDT 2008


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')]
and 
//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.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154053#4154053

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154053



More information about the jboss-user mailing list