I am trying to create custom index on jcr:content/cq:lastReplicationAction on AEM but for some reason it complained about "Not A Valid JCR Name"
Am I missing something here?
해결되었습니다! 솔루션으로 이동.
토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.
조회 수
답글
좋아요 수
@aemUser2345
For Property Index in OakIndexDefinition,
You need not specify path of the property, just go with all properties in propertyNames field (i.e. cq:lastReplicationAction)
And then you can specify node type for which this index is applicable in declaringNodeTypes field (i.e. cq:PageContent)
These should work.
For more info on above properties:
Checkout documentation : https://jackrabbit.apache.org/oak/docs/query/indexing.html
And these relevant references :
When creating a property index in AEM, you typically only need to specify the property name itself, without the full node path. This is because property indexes focus on indexing individual property values within nodes, not the entire node structure.
Hi @aemUser2345
It seems like you are encountering an issue with creating a custom index on jcr:content/cq:lastReplicationAction.The error message "Not a Valid JCR Name" suggests that there might be an issue with the syntax or format of the index definition
Make sure that the name attribute in the <cq:lastReplicationAction> property definition adheres to the rules for valid JCR names.
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://www.apache.org/jackrabbit/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:OsgiConfig"
reindex="true">
<!-- Define the custom index -->
<index
jcr:primaryType="oak:QueryIndexDefinition"
async="async"
compatVersion="{Long}2"
evaluatePathRestrictions="{Boolean}false"
type="lucene">
<!-- Specify the index rules -->
<indexRules jcr:primaryType="nt:unstructured">
<nt:base
jcr:primaryType="nt:unstructured">
<properties
jcr:primaryType="nt:unstructured">
<cq:lastReplicationAction
jcr:primaryType="nt:unstructured"
name="cq:lastReplicationAction"
type="String"/>
</properties>
</nt:base>
</indexRules>
</index>
</jcr:root>
@aemUser2345
For Property Index in OakIndexDefinition,
You need not specify path of the property, just go with all properties in propertyNames field (i.e. cq:lastReplicationAction)
And then you can specify node type for which this index is applicable in declaringNodeTypes field (i.e. cq:PageContent)
These should work.
For more info on above properties:
Checkout documentation : https://jackrabbit.apache.org/oak/docs/query/indexing.html
And these relevant references :
@aemUser2345 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
조회 수
답글
좋아요 수