DAM contents are disappearing after creating a new index | Community
Skip to main content
Anmol_Bhardwaj
Community Advisor
Community Advisor
August 31, 2021
Solved

DAM contents are disappearing after creating a new index

  • August 31, 2021
  • 1 reply
  • 735 views

Hi,

 

I have created a new index for full-text search with wildcards :

 

 

<search jcr:primaryType="oak:QueryIndexDefinition" async="[async]" compatVersion="{Long}2" evaluatePathRestrictions="{Boolean}true" excludedPaths="[/var,/etc/replication,/etc/workflow/instances,/jcr:system,/content/dam]" fulltextEnabled="{Boolean}true" includedPaths="[/content/]" reindex="{Boolean}false" reindexCount="{Long}36" seed="{Long}9003429838731429477" type="lucene"> <aggregates jcr:primaryType="nt:unstructured"> <cq:Page jcr:primaryType="nt:unstructured"> <include0 jcr:primaryType="nt:unstructured" path="jcr:content" relativeNode="{Boolean}true"/> </cq:Page> </aggregates> <indexRules jcr:primaryType="nt:unstructured"> <nt:base jcr:primaryType="nt:unstructured" includePropertyTypes="[String,Binary]"> <properties jcr:primaryType="nt:unstructured"> <template jcr:primaryType="nt:unstructured" name="jcr:content/cq:template" propertyIndex="{Boolean}true"/> <lastModified jcr:primaryType="nt:unstructured" name="jcr:content/cq:lastModified" ordered="{Boolean}true"/> <isFeatured jcr:primaryType="nt:unstructured" name="jcr:content/isFeatured" ordered="{Boolean}true"/> <prop jcr:primaryType="nt:unstructured" analyzed="{Boolean}true" isRegexp="{Boolean}true" name="^[^\\/]*$" nodeScopeIndex="{Boolean}true" useInExcerpt="{Boolean}true"/> <isHidden jcr:primaryType="nt:unstructured" name="jcr:content/isHidden" propertyIndex="{Boolean}true"/> </properties> </nt:base> </indexRules> </search>

 

 

The index is working for what it is meant for as in, it is showing results faster now.

But, after creating the index, all the DAM content is disappearing.

I have also included /content/dam in the excludedPaths[] but no change.

Can anyone please tell me what I'm doing wrong.

I have tried to change the indexrules nodeName from nt:base to cq:Page/cq:PageContent, but when I do that it is no longer picking up the index during the query.

 

I have to search within cq:Page in the jcr:content for a string like *retai* which is using wildcards.

Any ideas?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Anmol_Bhardwaj

I found the issue, the index was overriding OOTB lucene index because of the prop in the index rules. And because we don't have dam assets indexed in this, they were showing as blank.

As we are using wildcards in fulltext we need that property. So, to overcome this, I have added a property:

includedPaths[] = /content/<project-name>.

This way it only takes the queries inside that.

1 reply

Anmol_Bhardwaj
Community Advisor
Anmol_BhardwajCommunity AdvisorAuthorAccepted solution
Community Advisor
August 31, 2021

I found the issue, the index was overriding OOTB lucene index because of the prop in the index rules. And because we don't have dam assets indexed in this, they were showing as blank.

As we are using wildcards in fulltext we need that property. So, to overcome this, I have added a property:

includedPaths[] = /content/<project-name>.

This way it only takes the queries inside that.

kautuk_sahni
Community Manager
Community Manager
August 31, 2021

@anmol_bhardwaj Thank you for sharing the solution for the broader community. 

Kautuk Sahni