Expand my Community achievements bar.

SOLVED

No index found for the type cq:AuditEvent Audit Search Log error

Avatar

Level 3

when using Audit Log Search I'm facing this error 

hrempd_0-1649182250104.png

I installed oak index package from the documentation  but it didn't work 
my cqaudit node looks like this 

<cqAuditLucene
        jcr:created="{Date}2020-10-08T15:06:57.378-07:00"
        jcr:createdBy="Ensure Oak Index"
        jcr:primaryType="oak:QueryIndexDefinition"
        async="async"
        compatVersion="{Long}2"
        reindex="{Boolean}false"
        reindexCount="{Long}1"
        seed="{Long}-1815663312840145991"
        type="lucene">
        <indexRules jcr:primaryType="nt:unstructured">
            <cq:AuditEvent jcr:primaryType="nt:unstructured">
                <properties jcr:primaryType="nt:unstructured">
                    <path
                        jcr:primaryType="nt:unstructured"
                        name="cq:path"
                        propertyIndex="{Boolean}true"/>
                    <time
                        jcr:primaryType="nt:unstructured"
                        name="cq:time"
                        propertyIndex="{Boolean}true"/>
                    <type
                        jcr:primaryType="nt:unstructured"
                        name="cq:type"
                        propertyIndex="{Boolean}true"/>
                    <user
                        jcr:primaryType="nt:unstructured"
                        name="cq:userid"
                        propertyIndex="{Boolean}true"/>
                </properties>
            </cq:AuditEvent>
        </indexRules>
    </cqAuditLucene>

I have latest acs commons package installed and AEM 6.5.0
Any help will be appreciated, thanks

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi @hr-empd ,

Yes, you can remove the message by modifying this file - 

/apps/acs-commons/components/utilities/audit-log-search/content.jsp

From above file remove this section of the code from line 29-43 and the message will be removed - 

<div class="coral-Alert coral-Alert--notice index-warning">
	<button type="button" class="coral-MinimalButton coral-Alert-closeButton" title="Close" data-dismiss="alert">
		<i class="coral-Icon coral-Icon--sizeXS coral-Icon--close coral-MinimalButton-icon"></i>
	</button>
	<i class="coral-Alert-typeIcon coral-Icon coral-Icon--sizeS coral-Icon--alert"></i>
	<strong class="coral-Alert-title">Index Missing</strong>
	<div class="coral-Alert-message">
		<p>
		No index found for the type <code>cq:AuditEvent</code>, this will result in very slow performance or failure to search audit events.
		</p>
		<p>
		For more information on creating the necessary index, please see the <a target="_blank" href="https://adobe-consulting-services.github.io/acs-aem-commons/features/audit-log-search/index.html">ACS AEM Commons Audit Log Search feature doc page</a>.
		</p>
	</div>
</div>

But it is not recommended to modify the acs commons files rather you should create your own application by overriding this functionality and then modify. This is because whenever any upgrade comes or acs deployment happens on different servers, it will get overridden.

 

View solution in original post

3 Replies

Avatar

Employee Advisor

Hi @hr-empd ,

I tried and did see the exact same error you have mentioned. But as per documentation, I did installed the given package in the acs commons documentation here and it did work for me.

Try restarting your instance and then go and do the search, ignore the message if it still appears but the functionality will work.

https://adobe-consulting-services.github.io/acs-aem-commons/features/audit-log-search/index.html

 

Avatar

Level 3

Hi @Anish-Sinha 
yes the search works but is there any way to remove that error message as its important from client point of view 
Thanks 

Avatar

Correct answer by
Employee Advisor

Hi @hr-empd ,

Yes, you can remove the message by modifying this file - 

/apps/acs-commons/components/utilities/audit-log-search/content.jsp

From above file remove this section of the code from line 29-43 and the message will be removed - 

<div class="coral-Alert coral-Alert--notice index-warning">
	<button type="button" class="coral-MinimalButton coral-Alert-closeButton" title="Close" data-dismiss="alert">
		<i class="coral-Icon coral-Icon--sizeXS coral-Icon--close coral-MinimalButton-icon"></i>
	</button>
	<i class="coral-Alert-typeIcon coral-Icon coral-Icon--sizeS coral-Icon--alert"></i>
	<strong class="coral-Alert-title">Index Missing</strong>
	<div class="coral-Alert-message">
		<p>
		No index found for the type <code>cq:AuditEvent</code>, this will result in very slow performance or failure to search audit events.
		</p>
		<p>
		For more information on creating the necessary index, please see the <a target="_blank" href="https://adobe-consulting-services.github.io/acs-aem-commons/features/audit-log-search/index.html">ACS AEM Commons Audit Log Search feature doc page</a>.
		</p>
	</div>
</div>

But it is not recommended to modify the acs commons files rather you should create your own application by overriding this functionality and then modify. This is because whenever any upgrade comes or acs deployment happens on different servers, it will get overridden.