Expand my Community achievements bar.

SOLVED

Assets using tags with special characters are not returned using omnisearchbar

Avatar

Level 1

Hi,

 

If I create a tag with the name "pröva", AEM will create a cq:tag with:

  • the jcr:name set to "prova" - i.e. the 'ö' is stripped out and replace with 'o'
  • the jcr:title set to "pröva" - i.e. the 'ö' is not stripped out

If I now tag an asset with this tag, the asset nodes metadata\cq:tags property references the jcr:name of the tag and not the jcr:title of the tag, e.g. the asset will now have cq:tags set to "prova".

This means when using the omnisearchbar to try and retrieve the asset using the native spelling of the tag (i.e. searching for "pröva") nothing is returned.

This is because the omnisearchbar performs the following query:

(/jcr:root/content/dam//element(*, nt:folder)[(jcr:contains(., 'pröva'))] | /jcr:root/content/dam//element(*, dam:Asset)[(jcr:contains(., 'pröva'))])

And of course jcr:contains will only look at the cq:tags property and won't find pröva anywhere.

I have contacted Adobe support, but they told me to " update the indexes definition so that tags jcr:title are also part of the index" which as far as I can tell is a useless response.

Are the only options:

  • extend the omnisearch functionality to actually work with foreign tags (possibly by stripping out the foreign chars), or
  • every time someone tags an assets, also store the cq:tag title (not name) field as a hidden field, so that jcr:contains returns properly against special chars

Appreciate any guidance, as Adobe support were unable to help, despite insisting AEM has full support for languages.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

I have seen this issue as well, where the special character changed to - when creating tags and Omni search use query builder API which search based on keywords(properties value) store into JCR. There is no mapping between tag Title and path while performing a search.

but it supports and returns a valid tag with the special character when access tag using tag API. 

The second option looks good - you can write a javascript which triggered when you click on save and map the tag name with title and store as separate property(if works) otherwise replace the cq:tag property.

 



Arun Patidar

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

I have seen this issue as well, where the special character changed to - when creating tags and Omni search use query builder API which search based on keywords(properties value) store into JCR. There is no mapping between tag Title and path while performing a search.

but it supports and returns a valid tag with the special character when access tag using tag API. 

The second option looks good - you can write a javascript which triggered when you click on save and map the tag name with title and store as separate property(if works) otherwise replace the cq:tag property.

 



Arun Patidar