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

includedPathsexcludedPathsnameindexPath などのプロパティを使用して oak: QueryIndexDefinition を微調整すると、Oak Lucene インデックスを最適化できます。

  • includedPaths プロパティと excludedPaths プロパティは、インデックスを再作成する際にインデックスがトラバースするパスと、インデックスの更新をリッスンするパスを制限します。
  • name プロパティと indexPath プロパティを使用すると、ログメッセージにインデックスのパスまたは名前をタグ付けできるので、インデックスログを理解しやすくなります。 例:
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 and excludedPaths properties は 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