Error while executing QueryBuilder Query. | Community
Skip to main content
Level 6
May 27, 2024
Solved

Error while executing QueryBuilder Query.

  • May 27, 2024
  • 5 replies
  • 2451 views

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.

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 aanchal-sikka

@akshaybhujbale 

 

You definitely need to optimize your query. 

  • Make sure you query in the deepest possible level in the hierarchy.
  • Get rid of p.limit=-1. You are trying to get pages in a single hit. 

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. 

 

 

 

 

5 replies

sravs
Community Advisor
Community Advisor
May 27, 2024
Level 6
May 27, 2024

Hi @sravs Thanks for your response. 

How I can avoid this. Is there any configuration in AEM to avoid this.

Can we increases the number of nodes defined.

sravs
Community Advisor
Community Advisor
May 27, 2024

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://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/operations/indexing

https://medium.com/@manumathew28.94/indexing-in-aem-oak-indexing-b2cf0affa2c3

https://experienceleague.adobe.com/en/docs/experience-manager-65/content/implementing/deploying/deploying/queries-and-indexing

https://experienceleague.adobe.com/en/docs/experience-manager-learn/foundation/development/understand-indexing-best-practices

arunpatidar
Community Advisor
Community Advisor
May 27, 2024

Hi @akshaybhujbale 

could you please share querybuilder query?

Arun Patidar
Level 6
May 27, 2024

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

arunpatidar
Community Advisor
Community Advisor
May 27, 2024

Hi @akshaybhujbale 

Try with 

 

type=cq:Page
path=/content/{page_path}
path.self=true
p.limit=-1

Arun Patidar
aanchal-sikka
Community Advisor
aanchal-sikkaCommunity AdvisorAccepted solution
Community Advisor
May 27, 2024

@akshaybhujbale 

 

You definitely need to optimize your query. 

  • Make sure you query in the deepest possible level in the hierarchy.
  • Get rid of p.limit=-1. You are trying to get pages in a single hit. 

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. 

 

 

 

 

Aanchal Sikka
tushaar_srivastava
Level 6
May 27, 2024

Hi @akshaybhujbale 

 

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.!