如何最佳化Oak Lucene索引以減少索引時間

使用includedPaths和excludedPaths屬性最佳化Oak Lucene索引。

說明 description

環境

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

問題/症狀

最佳化AEM Oak Lucene索引以減少重新索引時間。

解決方法 resolution

您可以微調Oak:  QueryIndexDefinitionincludedPathsexcludedPathsnameindexPath等屬性,以最佳化Oak Lucene索引。

  • 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. [ 1]下方醒目提示的內容新增至對應的索引。  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"

     }
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f