Expand my Community achievements bar.

SOLVED

Index configurations are not working on AEMaaCS

Avatar

Level 1

I'm trying to set up an index for AEMaaCS for faster querying using the QueryBuilder to find metadata properties across a collection of subdirectories of assets in the dam directory (e.g. some-asset.jpg/jcr:content/metadata). These flags are set by the user to see if they want to have a certain asset image uploaded and managed on an external system, or removed.


I been following this documentation and the errors I'm receiving are along the lines of:
02.05.2023 15:04:34.753 *ERROR* [OsgiInstallerImpl] org.apache.jackrabbit.vault.fs.impl.io.DocViewImporter Error during processing of /oak:index/sendToDownstreamIndex: javax.jcr.nodetype.NoSuchNodeTypeException: Node type oak0:QueryIndexDefinition does not exist

Here is the configurations I set up, it is possible I haven't configured it correctly:

ui.apps\src\main\content\META-INF\vault\filter.xml:

 

<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
    <filter root="/oak:index/sendToInDownstreamIndex"/>
    <filter root="/oak:index/removeFromDownstreamIndex"/>
</workspaceFilter>

 

 

 

 

ui.apps\src\main\content\jcr_root\_oak_index\.content.xml:

 

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:oak="https://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:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:rep="internal"
        jcr:primaryType="nt:unstructured">
        <sendToDownstreamIndex jcr:primaryType="oak:QueryIndexDefinition"
            async="[async, nrt]"
            compatVersion="{Long}2"
            includedPaths="/content/dam"
            type="lucene">
            <indexRules jcr:primaryType="nt:unstructured">
                <nt:unstructured jcr:primaryType="nt:unstructured">
                    <properties jcr:primaryType="nt:unstructured">
                        <propertyName jcr:primaryType="nt:unstructured"
                                      name="companynamespace:sendToDownstream"/>
                    </properties>
                </nt:unstructured>
            </indexRules>
        </sendToDownstreamIndex>
        <removeFromDownstreamIndex jcr:primaryType="oak:QueryIndexDefinition"
            async="[async, nrt]"
            compatVersion="{Long}2"
            includedPaths="/content/dam"
            type="lucene">
            <indexRules jcr:primaryType="nt:unstructured">
                <nt:unstructured jcr:primaryType="nt:unstructured">
                    <properties jcr:primaryType="nt:unstructured">
                        <propertyName jcr:primaryType="nt:unstructured"
                                      name="companynamespace:removeFromDownstream"/>
                    </properties>
                </nt:unstructured>
            </indexRules>
        </removeFromDownstreamIndex>
</jcr:root>

 

 

 

 

Can I get a little guidance on how to set up the indexes so that we are searching on the boolean metadata properties? 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@fjhancock please check the aggregate set up done here in this blog for properties in metadata node

http://www.aemcq5tutorials.com/tutorials/aem-oak-indexing-comprehensive-guide/ 

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@fjhancock please check the aggregate set up done here in this blog for properties in metadata node

http://www.aemcq5tutorials.com/tutorials/aem-oak-indexing-comprehensive-guide/