Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to include Tag names in AEM search query builder while Tag IDs are saved in the repository

Avatar

Avatar
Validate 10
Level 2
SurendraKonatha
Level 2

Likes

5 likes

Total Posts

63 posts

Correct Reply

6 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 2
SurendraKonatha
Level 2

Likes

5 likes

Total Posts

63 posts

Correct Reply

6 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
SurendraKonatha
Level 2

25-07-2018

In AEM, how can we write a query as the default search works, where a Tag ID is saved for an asset, while the user wanted to search by the Tag Name/jcr:title?

For example, we can search for assets that has a particular Tag assigned. As below:

K23ED.png

the way there are assigned is as follows:

bXe5h.png

And are saved in the repository as ID's.. as below:

qy03F.png

For example, a tag hierarchy:

**TAG ID:**

/etc/tags/SXM/shows/entertainment/kids/8216/1073743514

The TAG NAME for the above:

SXM > Shows > Talk > Kids > Kids Place Live > Weird Al April

I tried the below but does not work?

    type=dam:Assets

    path=/content/dam/

    tagsearch=SXM:Shows/Talk/Kids/Kids Place Live/Weird Al April

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 10
Level 2
SurendraKonatha
Level 2

Likes

5 likes

Total Posts

63 posts

Correct Reply

6 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 2
SurendraKonatha
Level 2

Likes

5 likes

Total Posts

63 posts

Correct Reply

6 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
SurendraKonatha
Level 2

25-07-2018

Thanks @ArunPatidar . But that did not work.

After some trials i was able to get this to work. There is a predicate tagsearch that would build the tag hierarchy to the search query.

The below worked for me:

type=dam:Assets

path=/content/dam/

tagsearch=Weird Al April

type=dam:Assets

path=/content/dam/

tagsearch=Kids Place Live

type=dam:Assets

path=/content/dam/

tagsearch=Kids

Answers (2)

Answers (2)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,358 likes

Total Posts

3,228 posts

Correct Reply

918 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,358 likes

Total Posts

3,228 posts

Correct Reply

918 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

25-07-2018

Hi,

Just noticed one thing there is no type dam:Assets but dam:Asset

I think you can remove type from search otherwise it will be throwing errors.

Screen Shot 2018-07-26 at 12.29.41 AM.png

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,358 likes

Total Posts

3,228 posts

Correct Reply

918 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,358 likes

Total Posts

3,228 posts

Correct Reply

918 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

25-07-2018

Hi,

try below:

type=dam:Assets

path=/content/dam/

nodename:metadata

property=cq:tags

property.value=SXM:Shows/Talk/Kids/Kids Place Live/Weird Al April