We developed a DMS paragraph but we have one big issue with the SQL Query:
1) This first query retrieves all documents on a specific DMS folder:
SELECT * FROM nt:base WHERE (jcr:primaryType = 'mgnl:contentNode' OR
jcr:primaryType = 'mgnl:content') AND jcr:path LIKE
'/documentList/Communication/%' AND NOT jcr:path LIKE
'/documentList/Communication/%/%' ORDER BY title asc
It works fine
2) This second query retrieves all documents in all sub-folders:
SELECT * FROM nt:base WHERE (jcr:primaryType = 'mgnl:contentNode' OR
jcr:primaryType = 'mgnl:content') AND jcr:path LIKE
'/documentList/Communication/%' ORDER BY title asc
This query return an error. Can you help us?
We started with Xpath query but it is not possible to use folder starting with
a number (know issue of Jackrabit).
The error is the following:
ERROR info.magnolia.cms.util.QueryUtil 23.03.2010 12:34:55 -- can't execute
query [SELECT * FROM nt:base WHERE (jcr:primaryType = 'mgnl:contentNode' OR
jcr:primaryType = 'mgnl:content') AND jcr:path LIKE
'/wsDocumentList/Communication/%' ORDER BY title asc], will return empty
collection
java.lang.IndexOutOfBoundsException: bitIndex < 0: -1
at java.util.BitSet.get(BitSet.java:441)
at
org.apache.jackrabbit.core.query.lucene.DescendantSelfAxisQuery$DescendantSelfAxisScorer.isValid(DescendantSelfAxisQuery.java:557)
at
org.apache.jackrabbit.core.query.lucene.DescendantSelfAxisQuery$DescendantSelfAxisScorer.next(DescendantSelfAxisQuery.java:461)
at org.apache.lucene.search.Scorer.score(Scorer.java:57)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:136)
at org.apache.lucene.search.Searcher.search(Searcher.java:126)
at org.apache.lucene.search.Searcher.search(Searcher.java:105)
at
org.apache.jackrabbit.core.query.lucene.SortedLuceneQueryHits.getHits(SortedLuceneQueryHits.java:156)
at
org.apache.jackrabbit.core.query.lucene.SortedLuceneQueryHits.<init>(SortedLuceneQueryHits.java:117)
at
org.apache.jackrabbit.core.query.lucene.JackrabbitIndexSearcher.evaluate(JackrabbitIndexSearcher.java:108)
at
org.apache.jackrabbit.core.query.lucene.JackrabbitIndexSearcher.execute(JackrabbitIndexSearcher.java:84)
at
org.apache.jackrabbit.core.query.lucene.SearchIndex.executeQuery(SearchIndex.java:760)
at
org.apache.jackrabbit.core.query.lucene.SingleColumnQueryResult.executeQuery(SingleColumnQueryResult.java:66)
at
org.apache.jackrabbit.core.query.lucene.QueryResultImpl.getResults(QueryResultImpl.java:298)
at
org.apache.jackrabbit.core.query.lucene.SingleColumnQueryResult.<init>(SingleColumnQueryResult.java:58)
at
org.apache.jackrabbit.core.query.lucene.QueryImpl.execute(QueryImpl.java:131)
at org.apache.jackrabbit.core.query.QueryImpl.execute(QueryImpl.java:177)
at info.magnolia.cms.core.search.QueryImpl.execute(QueryImpl.java:73)
at
info.magnolia.cms.util.QueryUtil.exceptionThrowingQuery(QueryUtil.java:87)
at info.magnolia.cms.util.QueryUtil.query(QueryUtil.java:101)
...
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------