Query Builder for Multiple Metadata values which is (,) Separated | Community
Skip to main content
Level 3
June 24, 2024
Solved

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

  • June 24, 2024
  • 2 replies
  • 537 views

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


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

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

2 replies

h_kataria
Community Advisor
h_katariaCommunity AdvisorAccepted solution
Community Advisor
June 25, 2024

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

kapil_rajoria
Community Advisor
Community Advisor
June 25, 2024

Hi @vishal33 
Did you try: property.value=%ABC%