如何最佳化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來最佳化Oak Lucene索引: QueryIndexDefinition
具有屬性,例如 includedPaths
, excludedPaths
, name
和 indexPath
.
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...
索引最佳化的步驟:
- 前往 http://aem-host:port/crx/de/index.jsp 並以管理員身分登入。
- 瀏覽至
/oak:index
. - 新增以下醒目提示的屬性
[
1]
至對應的索引。 此includedPaths
和excludedPaths
屬性應為multi-value String (String[ ] )
. - 按一下 全部儲存 在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