Hi, is there a way to return URLS for pages which have a component with a property of a specific value?
E.g. if there are say 1000 games, and each has an overview page, and each of these pages has a game overview component which has a game ID and game name property.
The client website has a list of recently played game ids, and needs to load some thumbnails which are aspects of the games overview page.
Solved! Go to Solution.
Views
Replies
Total Likes
Use the following query builder query to get desired output
path=/content/game
property=sling:resourceType
property.value=sample/components/structure/game-overview
group.1_property=gameId
group.1_property.value=0 (Optional)
group.2_property=gameName
group.2_property.value=0 (Otional)
group.p.and=true
p.limit=-1
I am considering all the possible scenarios here as per provided description.
@TB3dock Yes, please use the query builder tool "/libs/cq/search/content/querydebug.html" to get the results with the help of the below query
Search for specific property :
path=/content/my-project
type=nt:unstructured
property=gameid
property.value=gameid-value
p.limit=-1
Search for property exist
path=/content/my-project
property=gameid
property.operation=exists
property.value=true
p.limit=-1
OR with SQL2 :
All nodes where a property contains some String OR Value
SELECT * FROM [nt:unstructured] AS node
WHERE ISDESCENDANTNODE(node, "/search/in/path")
AND CONTAINS([propertyName], "someString")
Thanks,
Sanket
Use the following query builder query to get desired output
path=/content/game
property=sling:resourceType
property.value=sample/components/structure/game-overview
group.1_property=gameId
group.1_property.value=0 (Optional)
group.2_property=gameName
group.2_property.value=0 (Otional)
group.p.and=true
p.limit=-1
I am considering all the possible scenarios here as per provided description.
This is awesome, thanks. Is it possible to specify the type of the component which has the property using type:xxxx? if so, how do I find out the value of xxxx?
Views
Replies
Total Likes
Views
Replies
Total Likes
The response contains an array of found pages, with each having the following data:
Is there any way to get the gameId in the response? Then we could do one query for all games, vs. one query per game.
Thanks!
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Likes
Replies