xpath - How to select similar data using SQL in JCR/jackrabbit? -


how write query in jcr/jackrabbit select data using:

"where title '%news%".

here structure in repository /rootnode , under root node have many child nodes , under child nodes have data in want search if string matches name or similar name. please pardon me if not able explain. m new jcr/jackrabbit. know how in database example

(select * customers city 'anystring%';) 

i want accomplish similar thing in jcr. thanks

if planning use xpath query syntax, jcr:like function can used achieve requirements.

/jcr:root//*[jcr:like(@jcr:title, '%news%')] 

for sql grammar, like operator can used same.

select * nt:base jcr:title '%news%' 

for sql2, like operator can used again.

select * [nt:base] s s.[jcr:title] '%news%' 

all above queries reference only, run on entire repository. when using them achieving desired functionality, kindly restrict them query within required subtree , not entire repo.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -