Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

We retail - Traversal index

tadijam47062732
Level 3
Level 3

I am trying to make AEM search to search for "sonja" jacket with traversal node to see how much time it will need.


I disabled lucene and cqPageLucene indexes from oak:index, but can not find any nodes when trying this query in Explain Query tool:

/jcr:root/content/we-retail/us/en//element(*, cq:Page)[(jcr:contains(., 'sonja'))]

This is tested on We Retail project.

Why this does not find any nodes, and with indexes it does?

What will be needed for this to find pages that have "sonja" in their title? (or any other query, it is only important that I can run some query with traversal to compare its speed with lucene)

1 Accepted Solution
jbrar
Correct answer by
Employee
Employee

Cost of traversal shows up as "Infinity" and that's the reason AEM does not start the traversal.

Listing the costs from my local instance:

Cost with cqPageLucene: 2799

Cost with Lucene: 185827

Cost with Traversal: Infinity

I believe you should focus on COST rather than TIME as cost is directly related to time

View solution in original post

11 Replies
berliant
Employee
Employee

What is your business case, that you need to disable indexes and force a traversal search? Traversal search will significantly affect performance and as a result, the AEM server might not responsive at all.

hamidk92094312
Employee
Employee

Are you saying when the index is in use "the same" query returns results ?

jbrar
Employee
Employee

How did you disable the "cqPageLucene" index?

tadijam47062732
Level 3
Level 3

That is exactly what I need. I am doing research on how much improvement will lucene index bring.

I want to run query with traversal (and get results) and then do the same with lucene index included.

So no business case, just research.

tadijam47062732
Level 3
Level 3

I set property type=disabled on lucene index node under oak:index

jbrar
Employee
Employee

You also need to disable lucene index as AEM starts using "lucene" index when cqpageLucene is disabled.

jbrar
Employee
Employee

I tested this on my local instance and disabling both "lucene" and "cqpagelucene" will force the query below to use traversal:

/jcr:root/content/we-retail/us/en//element(*, cq:Page)[(jcr:contains(., 'sonja'))]

Screen Shot 2019-09-23 at 10.01.57 AM.png

tadijam47062732
Level 3
Level 3

I have the same situation, now I am interested why it does not return any nodes as search results?

And how could I achieve that?

Because speed of traversal search that does not find any node is 1ms so it can not be compared to lucene index when lucene actually goes through content and searches nodes (which takes more time)

jbrar
Correct answer by
Employee
Employee

Cost of traversal shows up as "Infinity" and that's the reason AEM does not start the traversal.

Listing the costs from my local instance:

Cost with cqPageLucene: 2799

Cost with Lucene: 185827

Cost with Traversal: Infinity

I believe you should focus on COST rather than TIME as cost is directly related to time

tadijam47062732
Level 3
Level 3

It makes sense, I just thought it should run "infinity cost" if there is no cost lower than that. I will mark your question as correct. Thank you