org.apache.jackrabbit.oak.plugins.index.search.spi.query.FulltextIndex$FulltextPathCursor Index-Traversed 20000 nodes with filter Filter(query=select [jcr:path], [jcr:score], * from [cq:Page] as a /* xpath: //element(*, cq:Page) */, path=*)
How to avoid this error.
What is wrong happing here while executing Query.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
You definitely need to optimize your query.
Unless you are already not optimizing query based on paths, it was bound to fail, as the repository grows.
As a temporary solution, please go with solution 3, suggested by @sravs
Its an OSGi config, so you would need to push it via code.
Hi @akshaybhujbale , This issue happens when your query traversed more than the number of nodes allowed.
https://jackrabbit.apache.org/oak/docs/query/query-troubleshooting.html
Similar kind of issue has been addressed here
Option1: if an index has already been created for query or create a new one, try to reindex that by setting reindex = true.
Option2: update your query to execute under specified path other than executing it on the root level.
Option3: Increase the memory limit in the OSGi configuration (Temporary fix):
Aapche Jackrabbit Query Engine Setting service -> Update the value in Memory read limit field.
Hi @sravs
Option1: if an index has already been created for query or create a new one, try to reindex that by setting reindex = true.
Can you please guide me the steps and path where I can do this setting
2. Do we have access to configuration window on AEM Cloud
Where I can update the value of
Aapche Jackrabbit Query Engine Setting service -> Update the value in Memory read limit field. on AEM Cloud instance.
@akshaybhujbale , please refer for updating OOTB indexes or to create custom index definitions
https://medium.com/@manumathew28.94/indexing-in-aem-oak-indexing-b2cf0affa2c3
Hi @arunpatidar Thanks for your response
Below is the Query
type=cq:Page
1_group.1_path=/content/{page_path}
1_group.1_path.self=true
p.limit=-1
Try with
type=cq:Page
path=/content/{page_path}
path.self=true
p.limit=-1
hi @arunpatidar
Actually, Same query works with Another AEM instance but not for this particular instance.
Also, We can not change the query as it is working with Multiple AEM instances and it will lead to redesign our application.
Hi @akshaybhujbale
The issue is the query is not optimised, if the content is more on one of the instance then it will fail.
what are you trying to get from query?
if you want to list down all the pages within a tree then simply use resource iteration which will be faster and won't have any issues.
https://kiransg.com/2021/11/07/aem-iterating-node-best-practices/
You definitely need to optimize your query.
Unless you are already not optimizing query based on paths, it was bound to fail, as the repository grows.
As a temporary solution, please go with solution 3, suggested by @sravs
Its an OSGi config, so you would need to push it via code.
Two solution you can try
1- try to increase the number or Maximum POST Paramater maybe till 2000~ http://localhost:4502/system/console/configMgr/org.apache.sling.engine.parameters
2- got to configMgr and search for "Apache Sling Main Servlet" and increase the number of calls per request
Let me know if that works for you.!