path.exact , path.self does not work | Community
Skip to main content
sreenu539
Level 7
September 27, 2022

path.exact , path.self does not work

  • September 27, 2022
  • 3 replies
  • 1818 views

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.

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Saravanan_Dharmaraj
Community Advisor
Community Advisor
September 28, 2022
sreenu539
sreenu539Author
Level 7
September 28, 2022

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.

Level 4
September 28, 2022

@sreenu539 

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?

sreenu539
sreenu539Author
Level 7
September 28, 2022

This is not correct. node structure does not have any nodes below /qa

 

 

Level 4
September 29, 2022

@sreenu539 

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.

Level 4
September 28, 2022

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

sreenu539
sreenu539Author
Level 7
September 28, 2022

 

September 28, 2022

 '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'.