Expand my Community achievements bar.

SOLVED

query particula property value contains jcr query builder

Avatar

Level 2

hi,
I want to ask a question.
I want to search for a particular sub-string across all the property's values across all nodes starting from a rootnode.
How to build the query for this?

i need to return all the instances where the  jcr:links property contains /catalog/menu .

The below is not returning anything, please let me know.

type=cq:Page
property=jcr:links
property.value=/catalog/menu"
p.hits=full
path=/content

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 7

Have you tried using the full text search on relative paths ?

 

//more code... map.put("path", "/content"); map.put("type", "cq:Page"); map.put("group.p.or", "true"); map.put("group.1_fulltext", "/catalog/menu"); map.put("group.1_fulltext.relPath", "jcr:links"); map.put("group.2_fulltext", "something else of interes"); map.put("group.2_fulltext.relPath", "on another node perhaps"); //... more more code

/Johan

View solution in original post

1 Reply

Avatar

Correct answer by
Level 7

Have you tried using the full text search on relative paths ?

 

//more code... map.put("path", "/content"); map.put("type", "cq:Page"); map.put("group.p.or", "true"); map.put("group.1_fulltext", "/catalog/menu"); map.put("group.1_fulltext.relPath", "jcr:links"); map.put("group.2_fulltext", "something else of interes"); map.put("group.2_fulltext.relPath", "on another node perhaps"); //... more more code

/Johan