如何最佳化Oak Lucene索引以縮短索引時間

說明

環境

  • Adobe Experience Manager 6.0 + Oak 1.0.16或更新版本
  • Adobe Experience Manager 6.1 和 6.2

問題/症狀
最佳化AEM Oak Lucene索引以縮短重新索引時間。

解析度

您可以微調ok以最佳化Oak Lucene索引: QueryIndexDefinition 包含屬性,例如 includedPaths, excludedPaths, nameindexPath.

  • includedPathsexcludedPaths 屬性會限制索引在重新索引時要遍歷的路徑,以及它監聽的索引更新路徑。
  • nameindexPath 屬性使索引日誌更易於理解,因為它們會用索引的路徑或名稱標籤日誌消息。 例如:
30.01.2017 14:07:12.934 *DEBUG* pool-8-thread-2 org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor damassetlucene( /oak :index /damAssetLucene ) = Indexed 9000 nodes...

最佳化索引的步驟:

  1. 前往 http://aem-host:port/crx/de/index.jsp​並以管理員身分登入。
  2. 瀏覽至 /oak:index.
  3. 將下面突出顯示的屬性添加到相應的索引。 此 includedPaths  excludedPaths 屬性 multi-value String (String).
  4. 按一下 全部儲存 在CRXDe中。

1 /oak:index屬性修改

"authorizables" : {

     "includedPaths" : "/home" ,

     "reindexCount" : 1,

     "name" "authorizables" ,

     "compatVersion" : 2,

     "reindex" false ,

     "type" "lucene" ,

     "jcr:primaryType" "oak:QueryIndexDefinition" ,

     "async" "async" ,

     "indexPath" "/oak:index/authorizables"

     },



"cqPageLucene" : {

     "includedPaths" :

       "/content" ,

       "/etc"

     ,

     "reindexCount" : 1,

     "name" "cq:Page" ,

     "compatVersion" : 2,

     "reindex" false ,

     "type" "lucene" ,

     "jcr:primaryType" "oak:QueryIndexDefinition" ,

     "async" "async" ,

     "indexPath" "/oak:index/cqPageLucene"

     },



"cqTagLucene" : {

     "reindexCount" : 1,

     "name" "cqTag" ,

     "compatVersion" : 2,

     "reindex" false ,

     "type" "lucene" ,

     "jcr:primaryType" "oak:QueryIndexDefinition" ,

     "excludedPaths" :

       "/var" ,

       "/tmp" ,

       "/etc/replication" ,

       "/etc/workflow/instances" ,

       "/jcr:system"

     ,

     "async" "async" ,

     "indexPath" "/oak:index/cqTagLucene"

     },



"damAssetLucene" : {

     "includedPaths" : "/content/dam" ,

     "evaluatePathRestrictions" true ,

     "reindexCount" : 1,

     "name" "damassetlucene" ,

     "compatVersion" : 2,

     "reindex" false ,

     "type" "lucene" ,

     "jcr:primaryType" "oak:QueryIndexDefinition" ,

     "async" "async" ,

     "indexPath" "/oak:index/damAssetLucene"

     },



"lucene" : {

     "reindexCount" : 1,

     "name" "lucene" ,

     "reindex" false ,

     "includePropertyTypes" : "String" ,

     "type" "lucene" ,

     "jcr:primaryType" "oak:QueryIndexDefinition" ,

     "excludedPaths" :

       "/var" ,

       "/tmp" ,

       "/etc/replication" ,

       "/etc/workflow/instances" ,

       "/jcr:system"

     ,

     "async" "async" ,

     "indexPath" "/oak:index/lucene"

     },



"ntBaseLucene" : {

     "reindexCount" : 1,

     "name" "tags" ,

     "compatVersion" : 2,

     "reindex" false ,

     "type" "lucene" ,

     "jcr:primaryType" "oak:QueryIndexDefinition" ,

     "excludedPaths" :

       "/var" ,

       "/tmp" ,

       "/etc/replication" ,

       "/etc/workflow/instances" ,

       "/jcr:system"

     ,

     "async" "async" ,

     "indexPath" "/oak:index/ntBaseLucene"

     },





"workflowDataLucene" : {

     "reindexCount" : 1,

     "name" "workflow" ,

     "compatVersion" : 2,

     "reindex" false ,

     "type" "lucene" ,

     "jcr:primaryType" "oak:QueryIndexDefinition" ,

     "excludedPaths" :

       "/var" ,

       "/tmp" ,

       "/etc/replication" ,

       "/jcr:system"

     ,

     "async" "async" ,

     "indexPath" "/oak:index/workflowDataLucene"

     }

本頁內容