Hi!

I'm upgrading Jackrabbit from 1.6.1 to 2.1.1 and I need to translate an XPath 
query to JCR-SQL2, the query is as follows:

/jcr:root/some_node//element(*, mynt:document)[jcr:contains(jcr:content, 
'textToFind')]

I tried the following (removing the path constraint because I couldn't find how 
to do it)

SELECT * FROM [mynt:document] AS doc WHERE CONTAINS(doc.*, 'textToFind')

But I get no results and the original query returns 23 nodes. Can you help me 
with this as I checked the JCR 2.0 SQL-2 Grammar (Railroad diagrams) and the 
jackrabbit-spi-commons test cases but still I'm not sure how to use CONTAINS 
and how to restrict the query to a specific path. Thanks in advance.

Regards

Juan Botiva
                                          

Reply via email to