Hi,
I'm new to writing queries and I'm having trouble with a particular use case. Our DAM has a section organized in projects. Each project follows this same path: /content/dam/marketing-assets/<Region Name>/<Year>/<Project Name>/source-files/<File>
I want to run a query that identifies all files that are in folders with the name "source-files". I've experimented with the "path" predicate and wildcards ( * ) with no luck. Any advice on how to do this? I'm open to alternatives that would get the same results.
Thank you,
Morgan
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @MorganMeik
You can try the below query -
path=/content/dam
type=dam:Asset
group.1_property.value=%source-files%
group.1_property=jcr:path
group.1_property.operation=like
p.limit=10
Hi,
I believe what you are looking for is to use a "regex" in the path property, which, unfortunately, is not supported. According to the documentation, the usage of a wildcard is reserved for searches that use the "exact" property (meaning no descendants).
So, you may have two options:
group.1_path=/content/my/folder/result/1
group.2_path=/content/my/folder/result/2
2. Consider using a leveled path approach to include all folders. Just keep in mind that this might lead to performance issues, which you can address by implementing indexes.
Hope this helps
Hi @MorganMeik
You can try the below query -
path=/content/dam
type=dam:Asset
group.1_property.value=%source-files%
group.1_property=jcr:path
group.1_property.operation=like
p.limit=10
@MorganMeik Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Likes
Replies