I am trying below query
type=dam:Asset
path=/content/dam/iinvestor/qa
path.self=true
returning two results, why?
when I try below query
type=dam:Asset
path=/content/dam/iinvestor/qa
path.exact=true
No results at all
I am trying to get a dam:Asset by providing exact path in path value.
I am in need of writing multiple groups for each path, as path could be a parent dam folder or exact content fragment path.
Views
Replies
Total Likes
Are you trying something similar to this post which queries by group with path?
There is a change in requirement , so this would be different. I would like to get node by itself when path is dam:Asset and in another scenario path would be parent folder path. I am trying the first part where path is dam:Asset not a folder.
path.self=true : If true searches the subtree including the main node given in path, if false searches the subtree only
You see two results because those exist as a subtree of it.
Now when you do path.exact=true, that looks for the exact path however since you have another condition i.e. type=dam:Asset hence no result is returned.
The exact path that you have put doesn't have type as dam:Asset.
For multiple group, can you elaborate your problem better with example so that I could help you out accordingly?
This is not correct. node structure does not have any nodes below /qa
The path does relative matching, check for:
/content/dam/iinvestor/qa2
and you will see the difference. qa is present in both of your nodes, see the xpath it puts a * at end meaning wildcard match.
Can you tell me exactly which data you want to fetch out of all those and also please share the snapshot of their schema.
HI @sreenu539 ,
Can you share the node structure for
/content/dam/iinvestor/qa
'path.self=true' includes the subtree including the node given in the path value.
'path.exact=true' does not include the subtree.
Thanks,
Sweta
'path.self=true' gets the path itself, its children and grandchildren nodes in the result. (Not the siblings).
Try testing the first query for different node structure.
While 'path.exact=true' gets the direct child only (Not the path in the path value nor the grandchildren).
Since there are no assets as child, under the 'qa' node there is no results.
So for your requirement to get the node by itself, you need to use 'path.self=true'.
Views
Likes
Replies