我想知道索引选择逻辑是否更喜欢相同存储库路径的本地索引定义而不是全局索引定义。不幸的是,我找不到任何关于索引选择算法如何工作的文档。为了使事情更清楚,请考虑以下示例:
“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"
“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"