Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

Query Builder for Multiple Metadata values which is (,) Separated

Avatar

Level 2

Hi All,
Hope you all are doing well,
we have a requirement to get the asset path which has a (,) separated values in its metadata
We have written below query
////AEM Query////////////
path=/content/dam/example
type=dam:Asset
property=jcr:content/metadata/target-example
property.value=ABC%
property.operation=like
p.limit=-1

////AEM Query////////////

But it will fail query for below metadata value
XYZ_ABC, ABC
we have a metadata value which is kind of substring of other (,) separated value so can't use above property value
Is there any way in the Query Builder where we can solve above scenarios for (,) separated values

Request you please provide solution for this query

Thanks & Regards,
Vishal Jain


1 Accepted Solution

Avatar

Correct answer by
Level 7

I am not sure if I understood the requirement clearly but if its just comma which you are trying to find then you can do something like

path=/content/dam/example
type=dam:Asset
property=jcr:content/metadata/target-example
property.value=%,%
property.operation=like
p.limit=-1

Or

path=/content/dam/example
type=dam:Asset
property=jcr:content/metadata/target-example
property.value=%, ABC%
property.operation=like
p.limit=-1

Added space after comma as per your example XYZ_ABC, ABC

View solution in original post

2 Replies

Avatar

Correct answer by
Level 7

I am not sure if I understood the requirement clearly but if its just comma which you are trying to find then you can do something like

path=/content/dam/example
type=dam:Asset
property=jcr:content/metadata/target-example
property.value=%,%
property.operation=like
p.limit=-1

Or

path=/content/dam/example
type=dam:Asset
property=jcr:content/metadata/target-example
property.value=%, ABC%
property.operation=like
p.limit=-1

Added space after comma as per your example XYZ_ABC, ABC