Expand my Community achievements bar.

SOLVED

Why query builder not returning any results for type=dam:Asset even though assets primary type is dam:Asset

Avatar

Community Advisor

I have tried the below query in query builder but results showing up zero, I'm getting results only when I remove type=dam:Asset. I have verified in crx, the assets are of primary type dam:Asset only.

path=/content/dam/test
type=dam:Asset
p.limit=-1
p.guessTotal=true
property.value=ABC123
p.nodedepth=3
property=jcr:content/metadata/customProperty
p.hits=full

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

By rebuild I mean to run reindex process. Please follow below steps:

  1. Open crx/de.
  2. Go to node /oak:index/damAssetLucene.
  3. Change reindex property to true, and save that change.
  4. Observe error.log - you will see appropriate message once reindex process will end up.

After above process is completed you can try to run your query once again to see if that helps.

View solution in original post

4 Replies

Avatar

Community Advisor

Hi @santhosh_kumark, I have checked your query on my AEM instance by and it works fine. What I have observed locally, is that using type=dam:Asset will use damAssetLucene(/oak:index/damAssetLucene) index and when typed is removed completely I got information that it is traversal query.

So base on above I would suggest first to rebuild damAssetLucene(/oak:index/damAssetLucene), if this will not help maybe you will need to extend your index adding your custom property.

Avatar

Community Advisor

Hi @lukasz-m ,

 

Can you help me how to rebuild damAssetLucene(/oak:index/damAssetLucene) in AEM 6.5

Avatar

Correct answer by
Community Advisor

By rebuild I mean to run reindex process. Please follow below steps:

  1. Open crx/de.
  2. Go to node /oak:index/damAssetLucene.
  3. Change reindex property to true, and save that change.
  4. Observe error.log - you will see appropriate message once reindex process will end up.

After above process is completed you can try to run your query once again to see if that helps.

Avatar

Level 4

Santhosh, 

Given query is working perfectly fine in my local instance, 

mynitumail_0-1643646212110.png

As suggested by @lukasz-m, check your indexes and additionally you should setup debug level logs at com.day.cq.search.impl.builder.QueryImpl (path), to further troubleshoot the issue. 

follow below ref documentation for more information..

Query Builder API | Adobe Experience Manager