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
Solved! Go to Solution.
Views
Replies
Total Likes
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:
You need the query to detect fragment index.
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 ?
Hello,
tried but still the same issue.
@nitish-jain Did you validate the rebuilding of indexes through logs?
yes, the reindexing happens. but when the query is executed still seeing same "WARN" in logs
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.
@krati_garg, actually yes. I have only pasted the partial query from the logs. The complete logger statement has the graphQL query/content fragment information
*WARN* GET /graphql/execute.json/<query_path>HTTP/1.1] org.apache.jackrabbit.oak.plugins.index.search.spi.query.FulltextIndex$FulltextPathCursor Index-Traversed 20000 nodes with filter Filter(query=SELECT asset.* FROM [dam:Asset] AS asset WHERE ISDESCENDANTNODE(asset, '/content/dam') AND asset.[jcr:content/contentFragment] = CAST('true' AS BOOLEAN) AND asset.[jcr:content/data/cq:model] = '/conf/<content_fragment_model_path>' ORDER BY asset.[jcr:path], path=/content/dam//*, property=[jcr:content/contentFragment=[true], jcr:content/data/cq:model=[/conf/<content_fragment_model_path>]])
On my local set up, I tried executing similar query and with above mentioned - cfm-graphql-index-def-1.0.5.zip
For me - fragments(/oak:index/fragments) is being picked as Index and the cost for this index is coming out to be 12. Please see the screen shot.
Can you please check, which index is being picked for you?
on the environment, "damAssetLucene(/oak:index/damAssetLucene)" index is being picked. I tried re-indexing on the server without any luck. Let me check on the local server. Thanks.
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:
You need the query to detect fragment index.
Views
Replies
Total Likes
Views
Likes
Replies