Skip to main content
Krishna_C
Level 3
Dec 9, 2015 9:16 AM UTC
Solved

Slow Queries - Issue with Indexing

Hi Everyone,

I have created custom lucene  index with the properties interested(most of them are custom properties created in our project) and used used cq:template as well as a property to be indexed. 

Now when I run the query indexing engine is picking up the Default Index for cq:template provided by adobe . 

So whats the priority for indexing ? Cant I use the same property in two indexes ? 

Any help is appreciated . 

Thanks,

Krishna

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
ogillAccepted solution
Adobe Employee
Dec 9, 2015 1:33 PM UTC

Hi Krish,

sorry I just checked and the default cq:template is a property index and not a lucene index. When you run your query, is the performance adequate with the cqtemplate property index? I take it you are searching for pages with a specific cq:template value? 

The cost is calculated for each index and the lowest cost index used.  Using the explain query tool you can see the associated costs.

Regards,

Opkar

9 replies

kautuk_sahni
Level 9
Dec 9, 2015 11:57 AM UTC

Hi 

Please have a look at this article, i hope this would act as some help to you.

Link:- http://www.techaspect.com/blog/web-content-management/adobe-experience-manager/customizing-the-order-of-search-results

Thanks and Regards

Kautuk Sahni

Translate
Kautuk Sahni
Adobe Employee
Dec 9, 2015 11:58 AM UTC

Hi Krishna,

you should try and see if you can add your properties to existing OOTB indexes. From what I have heard anecdotally, try and avoid having multiple indexes for the same type, in this case you have two cq:template indexes defined. See if it helps and let us know.

Regards,

Opkar

Translate
Adobe Employee
Dec 9, 2015 12:01 PM UTC

kautuksahni wrote...

Hi 

Please have a look at this article, i hope this would act as some help to you.

Link:- http://www.techaspect.com/blog/web-content-management/adobe-experience-manager/customizing-the-order-of-search-results

Thanks and Regards

Kautuk Sahni

 

Kautuk,

this is an older article and does not apply to Oak index based searching.

Regards,

Opkar

Translate
kautuk_sahni
Level 9
Dec 9, 2015 12:04 PM UTC

Hi Opkar

Thank you. I will make a not for me.

Thanks and Regards

Kautuk Sahni

Translate
Kautuk Sahni
Krishna_C
Krishna_CAuthor
Level 3
Dec 9, 2015 12:21 PM UTC

Hi Opkar,

Thanks for the information. 

I will remove the cq:template in queries and I will try to stick to custom properties , I have added this assuming that it could make my search clean. I still have to check whether I can achieve all mu use cases by removing this.

Thanks,

Krish

Translate
ogillAdobe EmployeeAccepted solution
Adobe Employee
Dec 9, 2015 1:33 PM UTC

Hi Krish,

sorry I just checked and the default cq:template is a property index and not a lucene index. When you run your query, is the performance adequate with the cqtemplate property index? I take it you are searching for pages with a specific cq:template value? 

The cost is calculated for each index and the lowest cost index used.  Using the explain query tool you can see the associated costs.

Regards,

Opkar

Translate
Krishna_C
Krishna_CAuthor
Level 3
Dec 10, 2015 6:21 AM UTC

Thanks Opkar. 

So the cq:template index is of the lowest cost , then I think I may have to check the indexing. This issue is happening only in one of the environments  and it is taking the correct the index in other environments. I will check the configuration again.

Thanks again :)

Krish

Translate
sureshy2015
Level 4
Dec 10, 2015 7:22 AM UTC

there is a

evaluatePathRestrictions property which need to be true to pick your index + add included paths property it should be your project specific content path(this will reduce index size of yours than default).this should solve your issue

 

 

 

 

 

 

 

    
 
Translate
Krishna_C
Krishna_CAuthor
Level 3
Dec 10, 2015 7:32 AM UTC

Thanks Suresh.

I was aware of this but I was hesitant to do a code change to add paths in my queries. In 5.6 path was not indexed so we made sure our queries should not have paths within it for better performance.

As a last options I would add paths in my queries and index as well.

Thanks,

Krishna

Translate