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
  • 2450 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

@akshaybhujbale ,

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.

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