Hello Everyone,
While trying to install a package with an index , i get the following error .. but exporting it via package manager and importing it works.
Via build process i get the following error
/oak:index (org.xml.sax.SAXParseException; systemId: file:///C:/Users/......./jcr_root/_oak_index/.content.xml; lineNumber: 964; columnNumber: 68; The prefix "sling" for element "sling:OrderedFolder" is not bound.)
<custom
jcr:primaryType="oak:QueryIndexDefinition"
async="[async]"
compatVersion="{Long}2"
evaluatePathRestrictions="{Boolean}true"
includedPaths="[/conf/global/settings/dam/adminui-extension/metadataprofile]"
reindex="{Boolean}false"
reindexCount="{Long}6"
type="lucene">
<indexRules jcr:primaryType="nt:unstructured">
<sling:OrderedFolder jcr:primaryType="nt:unstructured">
<properties jcr:primaryType="nt:unstructured">
<jcrTitle
jcr:primaryType="nt:unstructured"
boost="{Long}2"
name="jcr:content/jcr:title"
nodeScopeIndex="{Boolean}true"
propertyIndex="{Boolean}true"
type="String"
useInSpellcheck="{Boolean}true"
useInSuggest="{Boolean}true"/>
</properties>
</sling:OrderedFolder>
</indexRules>
</custom>
Views
Replies
Total Likes
Anyone please?
I have followed your oak index structure but I didn't face any issue while installation via package manager -
.content.xml associated with jcr_root -
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal"
jcr:mixinTypes="[rep:AccessControllable,rep:RepoAccessControllable]"
jcr:primaryType="rep:root"
sling:resourceType="sling:redirect"
sling:target="/index.html"/>
.content.xml associated with _oak_index -
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:oak="http://jackrabbit.apache.org/oak/ns/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:rep="internal"
jcr:mixinTypes="[rep:AccessControllable]"
jcr:primaryType="nt:unstructured">
<socialLucene/>
<workflowDataLucene/>
<slingeventJob/>
<jcrLanguage/>
<versionStoreIndex/>
<repMembers/>
<cqReportsLucene/>
<commerceLucene/>
<counter/>
<authorizables/>
<enablementResourceName/>
<externalPrincipalNames/>
<cmLucene/>
<cqProjectLucene/>
<ntFolderDamLucene/>
<acPrincipalName/>
<uuid/>
<damAssetLucene/>
<rep:policy/>
<cqPayloadPath/>
<nodetypeLucene/>
<nodetype/>
<ntBaseLucene/>
<reference/>
<customLucene/>
<debalcustom
jcr:primaryType="oak:QueryIndexDefinition"
async="[async]"
compatVersion="{Long}2"
evaluatePathRestrictions="{Boolean}true"
includedPaths="[/conf/global/settings/dam/adminui-extension/metadataprofile]"
reindex="{Boolean}false"
reindexCount="{Long}0"
seed="{Long}-694108638461017097"
type="lucene">
<indexRules jcr:primaryType="nt:unstructured">
<sling:OrderedFolder jcr:primaryType="nt:unstructured">
<properties jcr:primaryType="nt:unstructured">
<jcrTitle
jcr:primaryType="nt:unstructured"
boost="{Long}2"
name="jcr:content/jcr:title"
nodeScopeIndex="{Boolean}true"
propertyIndex="{Boolean}true"
type="String"
useInSpellcheck="{Boolean}true"
useInSuggest="{Boolean}true"/>
</properties>
</sling:OrderedFolder>
</indexRules>
</debalcustom>
<principalName/>
<cqTagLucene/>
<lucene/>
<repTokenIndex/>
<externalId/>
<authorizableId/>
<cqPageLucene/>
</jcr:root>
Tested on AEM 6.5.9
Thanks a lot @DEBAL_DAS and i see the exact same behavior .. via mvn build process of the package is when i see issue with sling:Folder.Also changing to nt:folder helped but i want it to be a sling:OrderedFolder
I think i may have stumped on a solution . It cries for prefix so giving it one
<jcr:root xmlns:oak="http://jackrabbit.apache.org/oak/ns/1.0" xmlns:dam="http://www.day.com/dam/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:rep="internal"
jcr:mixinTypes="[rep:AccessControllable]"
jcr:primaryType="nt:unstructured">
I didn't face the above said issue with mvn build.
I have placed sample custom index here
Updated ui.apps filter.xml with <filter root="/oak:index/debalcustom"/> as shown below -
maven build was successful -
Are you planning to include your custom oak index within /oak:index into your deployment package? If yes , then please follow @Jörg_Hoh suggestion here https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/getting-maven-build-error-...
Hi , as stated the index html checked in for two indices that weren’t sling folder had no namespace. Adding this new index with sling folder created troubles, since the namespace was missing
this is the cause that is fixed
thanks all and you @DEBAL_DAS ,.. you’ve been pretty helpful most of the time
@DEBAL_DAS have you tried the approach of not including custom index into oak index? I somehow missed this and I think it’s a good idea to keep it away from oak index
Are you expecting to have following entry <filter root="/oak:index"/> in filter.xml as shown below -
My build was successful. In my project we aren't committing oak:index.
I have below in my filter file. The oak:index/content.xml file has entries for damassetlucene index as well with custom properties.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies