索引选择逻辑是否支持Apache OAK中的本地覆盖全局索引?

时间:2017-01-23 10:54:33

标签: lucene aem jackrabbit-oak

我想知道索引选择逻辑是否更喜欢本地而不是全局索引定义用于相同的存储库路径。不幸的是,我没有找到关于索引选择算法的工作原理的任何文档。为了使事情更清楚,请考虑以下示例:

" 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"

1 个答案:

答案 0 :(得分:2)

索引选择逻辑计算针对所有索引(本地和全局)的查询成本。评估顺序索引中第一个最便宜的索引用于查询。您可以通过AEM中的索引调试工具看到这一点。