AnsweredAssumed Answered

Lucene query and it's performance results

Question asked by kdejaeger on May 16, 2008
Latest reply on Jul 28, 2008 by andy
Hello,

I don't understand the performance differences of the following queries.
First we started of with this query (1) :
PATH:"/app:company_home/cm:A_Company/cm:A_Space//*" 
This query (2) includes a custom property check and was equal in performance:
PATH:"/app:company_home/cm:A_Company/cm:A_Space//*" AND @eb\:ebCategory:"Invoice"
This query (3) returns the same results as query 2 but was 15 times faster:
PATH:"/app:company_home/cm:A_Company/cm:A_Space//*" AND TYPE:"{eb.model}invoice" AND @eb\:ebCategory:"Invoice"
This query (4) returns also the same results as query 2 but was 30 times faster:
TYPE:"{eb.model}invoice" AND @eb\:ebCategory:"Invoice"

Questions :
Query 2 : why aren't we gaining performance when adding a custom property check
Query 3 : why is a type check suddenly so faster (what happens technically within lucene/alfresco?)
Query 4 : removing the specific path improves performance. why is the path decreasing performance? is it because of the //* expansion? without a specific path is not an option for the project

Outcomes