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 Lucene インデックスを最適化するには、includedPaths、excludedPaths、name、indexPathなどのプロパティを使用してoak: QueryIndexDefinitionを微調整します。

  • 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 および 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
experience-cloud-kcs-help-kbarticles