Expand my Community achievements bar.

How to include synonym.txt of index while packaging?

Avatar

Level 3

I have created  synonym.txt for a index  in one environment  and trying to import to another environment using ensure oak of acs commons.After import i am not able to see synonym.txt .

 

Followed link: https://adobe-consulting-services.github.io/acs-aem-commons/features/ensure-oak-index/index.html

 

Details are :

Local Author:

Dillibabu77_0-1638775265366.png

 

After exporting package , i see like this:

 

Dillibabu77_2-1638775386912.png

 synonymn.txt is under filters folder.

 

I created damAssetLunce.xml under my projects apps/oak-index

 

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:oak="http://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"
compatVersion="{Long}2"
async="async"
jcr:primaryType="oak:Unstructured"
type="lucene">
<aggregates jcr:primaryType="nt:unstructured">
<dam:AssetContent jcr:primaryType="nt:unstructured">
<include0
jcr:primaryType="nt:unstructured"
path="related"/>
<include1
jcr:primaryType="nt:unstructured"
path="related/*"/>
<include2
jcr:primaryType="nt:unstructured"
path="related/*/*"/>
</dam:AssetContent>
</aggregates>
<analyzers jcr:primaryType="nt:unstructured">
<default jcr:primaryType="nt:unstructured">
<tokenizer
jcr:primaryType="nt:unstructured"
name="Standard"/>
<filters jcr:primaryType="nt:unstructured">
<Synonym
jcr:primaryType="nt:unstructured"
synonyms="synonym.txt">
<synonym.txt/>
</Synonym>
</filters>
</default>
</analyzers>
<indexRules jcr:primaryType="nt:unstructured">
<dam:AssetContent
jcr:primaryType="nt:unstructured"
includePropertyTypes="all">
<properties jcr:primaryType="nt:unstructured">
<cqParentPath
jcr:primaryType="nt:unstructured"
analyzed="{Boolean}true"
isRegexp="{Boolean}false"
name="cq:parentPath"
nodeScopeIndex="{Boolean}true"
propertyIndex="{Boolean}true"
useInExcerpt="{Boolean}true"/>
</properties>
</dam:AssetContent>
</indexRules>
</jcr:root>

 

in same oak-index ,i moved damAssetContentLucene folder

 

Dillibabu77_3-1638775616024.png

 

Local Publish

After import into another environment, i see the following:

Dillibabu77_4-1638775751323.png

I cannot find/not imported  synonymn.txt in the server.

Can someone suggest me , what wrong i am doing?.

Thanks in advance

 

@Jörg_Hoh  @Vijayalakshmi_S 

 

 

 

3 Replies

Avatar

Community Advisor

Hi @Dillibabu77,

In the imported environment (in this case, local publish where you don't find synonym.txt file), can you check if the Synonym folder is having the property named "synonyms" with value being synonym.txt

Is it possible for you to share your project specific EnsureOakIndexManagerImpl OSGi config?

 

In parallel, try to create a DEBUG log entry for com.adobe.acs.commons.oak.impl in publish and then try to import. 

Avatar

Level 3

Dillibabu77_0-1638802552547.png

 

my configuration com.adobe.acs.commons.oak.impl.EnsureOakIndex-mysite.xml is 

<?xml version="1.0" encoding="UTF-8"?>

<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0"

    xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"

    jcr:primaryType="sling:OsgiConfig"

    ensure-definitions.path="/apps/oakindex/oak-index"

    oak-indexes.path="/oak:index"

    />

 

I dont have EnsureOakIndexManagerImpl config

Avatar

Employee Advisor

As you seem to install it via Content Packages, can you see that this file is listed as being installed in the installation report of the package manager? If not your filter.xml is not covering this location.