Hi Claus,

KÖLL Claus wrote:
i have added a text file to my workspace and it contains the word "car"
with the sql search
SELECT * FROM nt:base WHERE contains(*, 'car') a node will be found
the node path is /test.txt/jcr:content

But if i try to combine the full text search with a single property to limit
the search result it does not work
SELECT * FROM nt:base WHERE contains(*, 'car') and my:createuser = 'admin'

The node structure looks like

/test.txt (nt:file)
 -my:createuser (Mixin)
 - .. some properties
 /jcr:content (nt:resource)
   -jcr:mimetype
   -jcr:lastModified
   -jcr:data
   -....

Is it possible to limit a full text search ?

the property my:createuser is on a different node than the fulltext match.

the following query will work:

//element(*, nt:file)[jcr:contains(jcr:content, 'car') and my:createuser = 
'admin']

unfortunately there's no equivalent in SQL because SQL cannot distinguish node and property names.

SELECT * FROM nt:file WHERE contains(jcr:content, 'car') and my:createuser = 
'admin'

in the above query the jcr:content is interpreted as a property name.

regards
 marcel

Reply via email to