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>
Solved! Go to Solution.
Views
Replies
Total Likes
You need to declare the namespace at the begin of this XML document. You can create a package from a piece of the AEM repository and check the .content.xml files in there to get the right pattern.
You need to declare the namespace at the begin of this XML document. You can create a package from a piece of the AEM repository and check the .content.xml files in there to get the right pattern.
Yes @Jörg_Hoh that is exactly how i managed to fix it , unfortunately the xml that was checked in did not have the sling: prefix and hence it cried out with errors.
Thank you for your assistance as well.
I don't really understand the question.
I think that if you need that query, you should include it into the deployment. But looking at some details (especially the very narrow includePath statement) makes me think that it might benefit a single custom query (searching for titles of metadata profiles?).
Remember that JCR queries (exception union queries) just use a single query.
I am working on omnisearch for metadata profiles and it needs an index. I kept this index under oak:index but wondering to have it deployed via maven (including higher env)
1. I should keep it elsewhere ?
2. use acs ensure oak index ?
3. Package the index out for deployment to prod ? Keeping the definition under oak index
4. unsure if keeping it under oak index and deploying the new index to prod causes reindexing of other indexes such as damassetlucene that is also checked in( present as mode update in filter xml file ) , customized and that resides under oak index
Towards your questions:
1) it's a good idea to store the index definitions below /oak:index (everyone is looking there first).
2) Ensure Oak index is just a tool to help you to deploy and maintain index definitons; it tries to minimize the number of reindex-runs, which can appear if you always deploy the index definitions directly and if you don't pay close attention the details of that. I personally used it with good experience.
3) I always used EnsureOakIndex to get any (changed) index definition to any environment. In that context PROD was not different than STAGE and DEV.
4) EnsureOakIndex can help you to avoid unnecessary reindex runs (in case the index definition has not changd).
Hi @NitroHazeDev ,
I am curious to know if you are also seeing the same scenario for other xml's as well?.
@tb1687196 ,not with other files .Looks like when it was first checked in it was missed