I was wondering if the index selection logic does prefer local over global index definitions for the same repository paths. Unfortunately I coudn't find any docs on how exactly the index selection algorithm works. To make the things clearer, consider the following examples:
Global definition of "myIndex"
/oak:index/myIndex
- jcr:primaryType = "oak:QueryIndexDefinition"
- compatVersion = 2
- type = "lucene"
- async = "async"
- evaluatePathRestrictions = true
- queryPaths="[/content]"
- includePaths="[/content]"
+ indexRules
- jcr:primaryType = "nt:unstructured"
+ nt:unstructured
+ properties
- jcr:primaryType = "nt:unstructured"
+ code
- jcr:primaryType = "nt:unstructured"
- propertyIndex = true
- name = "myprop"
Local definition of "myIndex"
/content/oak:index/myIndex
- jcr:primaryType = "oak:QueryIndexDefinition"
- compatVersion = 2
- type = "lucene"
- async = "async"
- evaluatePathRestrictions = true
+ indexRules
- jcr:primaryType = "nt:unstructured"
+ nt:unstructured
+ properties
- jcr:primaryType = "nt:unstructured"
+ code
- jcr:primaryType = "nt:unstructured"
- propertyIndex = true
- name = "myprop"