Hello,
I want to search the nodes on 2 different paths. For example -> /content/AA and /content/BB. The below query works fine
SELECT p.* FROM [cq:PageContent] AS p WHERE ( ISDESCENDANTNODE(p,[/content/AA]) OR ISDESCENDANTNODE(p,[/content/BB]) ) AND ( CONTAINS(p.[cq:tags], ‘”testAA”) )
but throws the below exception in the logs
"org.apache.jackrabbit.oak.query.QueryImpl Fulltext query without index for filter Filter"
Adobe document suggests to improve the query if we get the above exception.
What is the best way to form a query to search in 2 different paths ? Any suggestions.
Thanks !!
Solved! Go to Solution.
Views
Replies
Total Likes
@srajput-woolies SELECT p.* FROM [cq:PageContent] AS p WHERE ( ISDESCENDANTNODE(p,[/content/AA]) OR ISDESCENDANTNODE(p,[/content/BB]) ) , Till this level there will be no issues.
Once you added contains to the query which is treating as fulltext query and showing that in the log. May be you need to relook at the index which you have in place already.
Do you have property and fulltext indexes in your aem already, if not you need to create.
In your query you have used contains and checking against one property/ so it treats as full text query,.
SELECT p.* FROM [cq:PageContent] AS p WHERE ( ISDESCENDANTNODE(p,[/content/AA]) OR ISDESCENDANTNODE(p,[/content/BB]) ) AND ( CONTAINS(p.[cq:tags], ‘”testAA”) )
Make sure that , you have created the fullest and property indexes properly . So that you will get the results quickly without traversing through several nodes.
you can check below blogs.
http://www.aemcq5tutorials.com/tutorials/aem-oak-indexing-comprehensive-guide/
Thanks for the response.
We already has index for this query, which search only at one path -
SELECT p.* FROM [cq:PageContent] AS p WHERE ISDESCENDANTNODE(p,[/content/AA]) AND ( CONTAINS(p.[cq:tags], ‘”testAA”) )
But due to one of the requirement, we have to search at 2 paths now, hence we updated our query, which looks as below (ISDESCENDANTNODE with OR)
SELECT p.* FROM [cq:PageContent] AS p WHERE ( ISDESCENDANTNODE(p,[/content/AA]) OR ISDESCENDANTNODE(p,[/content/BB]) ) AND ( CONTAINS(p.[cq:tags], ‘”testAA”) )
After the Query update, we get the Index exception as warning in logs.
Thanks!!
@srajput-woolies SELECT p.* FROM [cq:PageContent] AS p WHERE ( ISDESCENDANTNODE(p,[/content/AA]) OR ISDESCENDANTNODE(p,[/content/BB]) ) , Till this level there will be no issues.
Once you added contains to the query which is treating as fulltext query and showing that in the log. May be you need to relook at the index which you have in place already.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies