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.

How to search the assets by using the ID in the Asset Property Advance Tab

Avatar

Level 5

Hi All,

I want to search the asset by using the ID in the Asset Property > Advance Tab, so when i try to search using the ID it should display the asset in the search result. So how we can achive this any suggestion or ideas please

Nandheswara_1-1719477543784.png 

Nandheswara_2-1719478280617.png

 

Thanks

Nandheswara

 

6 Replies

Avatar

Community Advisor

Hi, 

The search is based on the properties (metadata) indexed by the damAssetLucene index, by default there is the list of specific metadata indexed, you can find those details here: https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/assets/manage/se... . So to search by that metaData field you are trying to, you should index that property as well (jcr_uuid) as part of the damAssetLucene index. You can check how to properly version an index and more details here: https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/operations/index...

 

But adding the below property and triggering a reindex of the damAssetLucene worked for me:

EstebanBustamante_1-1719493585731.png

 

Result:

EstebanBustamante_2-1719493611277.png

 

 

Hope this helps.



Esteban Bustamante

Avatar

Level 5

Hi @EstebanBustamante 

 

I have tried adding the jcr:uuid in the oak:index and indexing is done, checked it through query builder as well,
but when I try to search through the search bar, i'm not getting the results,
When I checked the error log, I observe the below error.

 

2024-07-01T07:37:51.123Z *ERROR* sling-oak-4-org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate-fulltext-async org.apache.jackrabbit.oak.segment.SegmentNotFoundExceptionListener Segment not found: 52541c67-fb0b-4eab-a04c-c0cf8194676e. SegmentId age=1534968ms [VSAD_ID=D45V, app_name=EquipmentGuide, user_agent=NA, type=NA, loggedin_user_id=NA, server_host=NA, vast_id=24908, True_ip=NA, api_url=NA, user_device=NA, app_session_id=NA, sso_session_id=NA, status_code=NA]
org.apache.jackrabbit.oak.segment.SegmentNotFoundException: Segment 52541c67-fb0b-4eab-a04c-c0cf8194676e not found

Avatar

Community Advisor

The property name is jcr:uuid, not jce:uuid, was that a typo? Please check the screenshots I added. The error you find may be related with something not done properly while indexing. Can you please try to re index one and make sure this is complete without errors? Are you checking different uuid's?



Esteban Bustamante

Hi @EstebanBustamante 

I have tried this and It worked out for me after reindexing only, 

 

First I have added the node jcr:uuid along with its properties as mentioned.

Then In the damAssetLucene I have changed the property of reindex to true

(without changing it to true, and keeping it as false, I have tried to invoke the reindexing but it did not worked out, so I changed it to true)

And then I have the invoked the reindexing through http://localhost:4502/system/console/jmx/org.apache.jackrabbit.oak%3Aname%3Drepository+manager%2Ctyp...

 

Nirmal_Kumar1_0-1720177020713.png

 

After that I have got the results for asset Id,

 

Here are few questions:

1) Do we need to change the property of reindex to false again?

or shall it remain in true itself?

 

2) May i know do we have any impacts while reindexing?

 

3) Do we need to reindex by invoking or just we need to change the property of reindex to true?

Kindly explain more on triggering the reindex.

 

Thanks

Avatar

Community Advisor

Hi @Nirmal_Kumar1 @Nandheswara whenever you make a change in the index's definition, you must reindex the index, otherwise, changes won't take effect. Answering your questions:

 

  1. The "reindex" property automatically returns to "false" once the indexing process is finished.

  2. The damLucene index is an asycn index, that's why, the Indexing process is an asynchronous process, so it should not directly impact author activities. However, it is well-known that reindexing large indexes or those defined incorrectly could cause some performance degradation. 

  3. Correct. When you set the "reindex" property to true in the index definition, the index triggers a reindex and resets the property to false once the reindexing is complete. You can check the index process checking the log entries or checking the timestamp in the JMX console.

 

Please check this article for more reference: https://blogs.perficient.com/2017/04/19/rebuild-indexes-in-aem-with-oak-index-manager/

 

Hope this helps



Esteban Bustamante

Avatar

Administrator

@Nandheswara Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni