Honestly, I've tried :
//* : returns my 'it-works' node and all it's children (3-levels total), as
well as a couple of other top level nodes without children
/jcr:root//* : returns them all as above
/* : returns nothing
/jcr:root/* : returns all 3 top level nodes
/jcr:root/it-works : returns nothing
/jcr:root//it-works : returns nothing
/jcr:root//it-works/* : returns nothing
/jcr:root/*/* : returns nothing
/jcr:root//*/* : returns them all again
I did try the Criteria API - good work and certainly useful for more complex
queries ... but I believe it converts to XPath for the actual query ... and
gets the same results as above!
I'm completely stumped, and thinking about writing my own XPath query
implementation, or just moving directly to the HierarchyManager and forgetting
XPath completely!
Dunno if it makes a difference, but I'm using 4.3.5 Magnolia - and the actual
search is done by Lucene where the debugging goes like this :
2011-05-23 16:39:58,541 DEBUG com.edsa.vlp.test.TestMagnoliaTestCase
: Doing Query : /jcr:root//it-works
2011-05-23 16:39:58,542 DEBUG org.apache.jackrabbit.core.query.lucene.QueryImpl
: Executing query:
+ Root node
+ Select properties: *
+ PathQueryNode
+ LocationStepQueryNode: NodeTest={} Descendants=false Index=NONE
+ LocationStepQueryNode: NodeTest={}it-works Descendants=true Index=NONE
2011-05-23 16:39:58,565 DEBUG
pache.jackrabbit.core.query.lucene.QueryResultImpl: getResults(2147483647)
limit=0
2011-05-23 16:39:58,609 DEBUG
ckrabbit.core.query.lucene.DescendantSelfAxisQuery: Collected 1 context hits in
1 ms for DescendantSelfAxisQuery(_:PARENT:, +_:NAMESPACE_URI:
+_:LOCAL_NAME:it-works, 1)
2011-05-23 16:39:58,610 DEBUG
jackrabbit.core.query.lucene.SortedLuceneQueryHits: getHits() 0/32768
2011-05-23 16:39:58,610 DEBUG
pache.jackrabbit.core.query.lucene.QueryResultImpl: query executed in 45 ms
2011-05-23 16:39:58,610 DEBUG
pache.jackrabbit.core.query.lucene.QueryResultImpl: retrieved ScoreNodes in 0 ms
2011-05-23 16:39:58,612 DEBUG org.apache.jackrabbit.core.query.QueryImpl
: executed in 0.07 s. (/jcr:root//it-works)
2011-05-23 16:39:58,619 DEBUG
rabbit.core.query.lucene.DocOrderScoreNodeIterator: 0 node(s) ordered in 1 ms
Thanks for reading this far
tim
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=803af20d-bbd4-4890-8697-481935abfce3
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------