Hi ,
We are using AEM6.5 OOTB find and replace functionality ,but noticed in the logs that this is causing lot of nodes to traversed hence want to index this
Would need help based on below as what is the query sent for this so that based on the query could be indexed using the below https://oakutils.appspot.com/generate/index
From logs:-
org.apache.jackrabbit.oak.plugins.index.Cursors$TraversingCursor Traversed 15000 nodes with filter Filter(query=select [jcr:path], [jcr:score], from [nt:base] as a where isdescendantnode(a, '/content/project/us/en') or jcr:like(fn:lower-case(@searchPath),'%lorems%'))] option(traversal ok) /, path=/content/project/us/en//*, property=[function*lower*@searchPath=[(%lorems%..], searchPath=[is not null]]); consider creating an index or changing the query
1> What is the OOTB query sent for this
To find a text in the page ,
Say the page /content/project/us/en had text "abc" and must be replaced with "test"
We are using OOTB suffixes like find.json for this
http://localhost:4502/content/project/us/en.find.json?_charset_=utf-8&f=abc&cs=false&wwo=false&cq_ck=1614580151256
2> What is the OOTB query sent for this
To replace:-
We are using OOTB suffixes like replace.html for this
http://localhost:4502/content/project/us/en.replace.html
With post data as below:-
p: /content/project/us/en
_charset_: utf-8
:status: browser
s: /content/project/us/en
f: abc
r: test
Thanks
Solved! Go to Solution.
Hi @srinivas_chann1,
Create a logger configuration for the below mentioned classes(Debug) in Sling Log(http://localhost:4502/system/console/slinglog) and trigger find action.
org.apache.jackrabbit.oak.query
org.apache.jackrabbit.oak.query.QueryImpl
org.apache.jackrabbit.oak.query.SQL2Parser
org.apache.jackrabbit.oak.query.QueryEngineImpl
In particular,
Once you get the query from the logs, use Query Performance tool for further action. (Tools -> Diagnosis -> Query Performance -> Explain query)
Hi @srinivas_chann1,
Create a logger configuration for the below mentioned classes(Debug) in Sling Log(http://localhost:4502/system/console/slinglog) and trigger find action.
org.apache.jackrabbit.oak.query
org.apache.jackrabbit.oak.query.QueryImpl
org.apache.jackrabbit.oak.query.SQL2Parser
org.apache.jackrabbit.oak.query.QueryEngineImpl
In particular,
Once you get the query from the logs, use Query Performance tool for further action. (Tools -> Diagnosis -> Query Performance -> Explain query)
I was able to capture logs using .find.json but for replace.html does not shown any query in logs .How to find what is the query for that
for http://localhost:4502/content/project/us/en.replace.html it is not showing any query in logs so what does this mean ,I need to looks any other packages in logs
Thanks
Views
Replies
Total Likes
When "p" is passed in the request body for replace call, respective path's content resource is used for modifying/replacing logic, No query will be executed.
Only when "p" is not provided, query is executed. You can try the same.
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Likes
Replies