Custom oak:index for content fragment causing issue on query result | Community
Skip to main content
kaikubad
Community Advisor
Community Advisor
August 28, 2024

Custom oak:index for content fragment causing issue on query result

  • August 28, 2024
  • 1 reply
  • 1044 views

We are using a lot of content fragment on our aem 6.5 project. On backend we do search for content fragment based on path and datetime combination. Recently we have added a custom property oak index only for our content fragments. From the query performance tool we checked that query is picking proper index.

But the problem arrises when there is any update on content fragment data the query result is still the same. If we manually reindex the custom oak:index that we created, then it works again.

Also sometime the result is not as expected. But got fix if we manually reindex the specific oak:index.

What could be the issue? Are we missing something? I am sharing a screenshot here.

Note: The querybuilder console result and code result is always same for the same query.

 

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

1 reply

h_kataria
Community Advisor
Community Advisor
August 28, 2024

Both author and publish are behaving same or is there any difference ?
Are you updating the content fragment programmatically or when you update it manually then also you are facing the issue ? 

kaikubad
Community Advisor
kaikubadCommunity AdvisorAuthor
Community Advisor
August 28, 2024

yes same for author and publisher.

and we don't change content fragments programmatically. Only the author changes the content fragments.

h_kataria
Community Advisor
Community Advisor
August 28, 2024

I have not worked on it directly, but I checked the documentation (https://adobe-consulting-services.github.io/acs-aem-commons/features/ensure-oak-index/index.html ) and there seems to be a property mismatch forceIndex vs forceReindex Not sure if that has anything to do with it though.
Also you probably don't need recreateOnUpdate. Check this https://github.com/Adobe-Consulting-Services/acs-aem-tools/issues/201 
Sorry, couldn't be of much help here.