Issue with Indexes with graphQL APIs/queries | Community
Skip to main content
Level 2
November 21, 2022
Solved

Issue with Indexes with graphQL APIs/queries

  • November 21, 2022
  • 2 replies
  • 3347 views

Hi All,

 

We have integrated GraphQL with AEM 6.5.13. The APIs are working fine but failing issue in error.log as getting WARN as:

*WARN* [204.28.140.7 [1669003115125] GET <query endpoint> HTTP/1.1] org.apache.jackrabbit.oak.plugins.index.search.spi.query.FulltextIndex$FulltextPathCursor Index-Traversed 20000 nodes

 

We have installed the "cfm-graphql-index-def-1.0.5.zip" package and have validated that the following indexes are present:

/oak:index/assetPrefixNodename
/oak:index/fragments

 

We have also tried to rebuild the indexes but the logs still report the warnings.

 

We tried  https://IP/libs/granite/operations/content/diagnosistools/queryPerformance.html to explain the query and noticed that the GraphQL queries are using "damAssetLucene(/oak:index/damAssetLucene)" index and not "/oak:index/fragments".

 

We tried the https://oakutils.appspot.com/generate/index to check the new index definition but the suggestions were in sync with "/oak:index/fragments" index.

 

Please advise what we are missing or do we need to create new indexes.

 

Logs for "Explain Query":

Applicable IndexingRule found IndexRule: nt:base Applicable IndexingRule found IndexRule: nt:base Applicable IndexingRule found IndexRule: nt:base Applicable IndexingRule found IndexRule: nt:base Applicable IndexingRule found IndexRule: nt:base Applicable IndexingRule found IndexRule: dam:Asset Applicable IndexingRule found IndexRule: dam:Asset cost for [/oak:index/assetPrefixNodename] of type (lucene-property) with plan [lucene:assetPrefixNodename(/oak:index/assetPrefixNodename) +:ancestors:/content/dam +jcr:content/contentFragment:true] is 1010100000.00 cost for [/oak:index/damAssetLucene] of type (lucene-property) with plan [lucene:damAssetLucene(/oak:index/damAssetLucene) :ancestors:/content/dam] is 21672.00 cost for lucene-property is Infinity cost for aggregate lucene is Infinity looking for plans for paths : [] cost for aggregate solr is Infinity cost for traverse is 403556.0

 

 

Thanks,

Nitish

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

It is picking  [lucene:assetPrefixNodename(/oak:index/assetPrefixNodename) and [lucene:damAssetLucene(/oak:index/damAssetLucene) indexes to compare.

 

I tried re-indexing the "/oak:index/fragments" but it is still not getting picked.

 

 

 


As per the screen shot attached, it appears oak:index/fragments is not even getting evaluated for the query. Please follow below link to troubleshoot:

https://experienceleague.adobe.com/docs/experience-manager-65/deploying/deploying/troubleshooting-oak-indexes.html?lang=en

 

You need the query to detect fragment index.

@nitish-jain 

2 replies

Saravanan_Dharmaraj
Community Advisor
Community Advisor
November 21, 2022

Hi @nitish-jain ,

   Just for testing purpose., could you please move the "fragments" index definition inside the content fragments folder and run the query again to see if it picks the fragments index instead of damLuceneIndex ? 

Level 2
November 22, 2022

Hello,

 

tried but still the same issue.

krati_garg
Adobe Employee
Adobe Employee
November 22, 2022

@nitish-jain Did you validate the rebuilding of indexes through logs?

Level 2
November 22, 2022

yes, the reindexing happens. but when the query is executed still seeing same "WARN" in logs

krati_garg
Adobe Employee
Adobe Employee
November 23, 2022

The WARN message, does not indicate it is coming out of Content Fragment query.

 

Can you please check other queries, who can possibly be the culprit for this Warn Msg.

@nitish-jain