Expand my Community achievements bar.

SOLVED

Custom oak indexing deployment issue

Avatar

Level 1

Hi All,

I am trying to deploy my custom oak indexes which is placed under "ui.apps/src/main/content/jcr_root/_oak_index" and added the filter 

<filter root="/oak:index" mode="update"/>

When I try deploying my code locally below is the error 
[ERROR] ValidationViolation: Package of type 'APPLICATION' is not supposed to contain content outside root nodes 'apps' or 'libs'! @ jcr_root/_oak_index/.content.xml, line 63, validator: jackrabbit-packagetype, JCR node path: /oak:index
Found 41 violation(s) (with severity=ERROR). Check above errors for details -> [Help 1]
How can I fix this? Is there anything else I am missing?
Appreciate your help!


1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @PriyankaKh4,

Can you try enabling the following configuration in your filevault-package-maven-plugin inside the ui.apps pom.xml?

<plugin>
  <groupId>org.apache.jackrabbit</groupId>
  <artifactId>filevault-package-maven-plugin</artifactId>
  <configuration>
    <allowIndexDefinitions>true</allowIndexDefinitions>
  </configuration>
</plugin>

Why is this necessary?

It is necessary to enable the allowIndexDefinitions option in the filevault-package-maven-plugin:

  • allowIndexDefinitions: true - Allows packaging and deployment of custom Oak index definitions.

Official Adobe Documentation:
This requirement is documented in Adobe’s official guide on indexing for AEM as a Cloud Service:

Adobe AEM Indexing Guide

“To include custom indexes in your application content packages, it is necessary to enable the allowIndexDefinitions and noIntermediateSaves options in the filevault-package-maven-plugin.”


Santosh Sai

AEM BlogsLinkedIn


View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

Hi @PriyankaKh4,

Can you try enabling the following configuration in your filevault-package-maven-plugin inside the ui.apps pom.xml?

<plugin>
  <groupId>org.apache.jackrabbit</groupId>
  <artifactId>filevault-package-maven-plugin</artifactId>
  <configuration>
    <allowIndexDefinitions>true</allowIndexDefinitions>
  </configuration>
</plugin>

Why is this necessary?

It is necessary to enable the allowIndexDefinitions option in the filevault-package-maven-plugin:

  • allowIndexDefinitions: true - Allows packaging and deployment of custom Oak index definitions.

Official Adobe Documentation:
This requirement is documented in Adobe’s official guide on indexing for AEM as a Cloud Service:

Adobe AEM Indexing Guide

“To include custom indexes in your application content packages, it is necessary to enable the allowIndexDefinitions and noIntermediateSaves options in the filevault-package-maven-plugin.”


Santosh Sai

AEM BlogsLinkedIn


Avatar

Level 1

Hi @SantoshSai,

Thank you for your response, I have updated <allowIndexDefinitions>true</allowIndexDefinitions> the issue is still exists.

Avatar

Community Advisor

@PriyankaKh4 Could you check what is the package type?

<packageType>application</packageType>

change it to 

<packageType>mixed</packageType>

 


Santosh Sai

AEM BlogsLinkedIn


Avatar

Level 1

Thank you @SantoshSai it worked!