Search Synonym
In Search , I am trying to implement search synonym.
I have updated Lucene and PageLucene index to have analyzer with details of synonym.
In search I have enabled search suggestion and search quick results. It is pointing to path /content/we-retail/us/en. In synonym txt file I have 2 set of entries.
1.women,womens,lady
2.men,mens,gentelmen
so during search I believe when I enter 'lady' it supposed to bring all records based on synonym matching will bring the result. But this is not happening. I believe on entering 'lady' it should even bring result of 'women' and 'womens' as well.
Please advise if there is anything I am still missing in configuration if any ?
Here is analyzers entry added in existing lucene and cqPageLucene index
<lucene
jcr:primaryType="oak:QueryIndexDefinition"
async="[fulltext-async]"
codec="Lucene46"
compatVersion="{Long}2"
deprecated="{Boolean}true"
excludedPaths="[/var,/etc/replication,/etc/workflow/instances,/jcr:system]"
reindex="{Boolean}false"
reindexCount="{Long}1"
seed="{Long}2769657670289014804"
type="lucene">
<aggregates jcr:primaryType="nt:unstructured">
<nt:file jcr:primaryType="nt:unstructured">
<include0
jcr:primaryType="nt:unstructured"
path="jcr:content"/>
</nt:file>
</aggregates>
<analyzers jcr:primaryType="nt:unstructured">
<default jcr:primaryType="nt:unstructured">
<charFilters jcr:primaryType="nt:unstructured">
<HTMLStrip jcr:primaryType="nt:unstructured"/>
<Mapping jcr:primaryType="nt:unstructured"/>
</charFilters>
<filters jcr:primaryType="nt:unstructured">
<LowerCase jcr:primaryType="nt:unstructured"/>
<Synonym jcr:primaryType="nt:unstructured" synonyms="synonym.txt" ignoreCase="{Boolean}true">
<synonym.txt/>
</Synonym>
</filters>
<tokenizer jcr:primaryType="nt:unstructured" name="Classic"/>
</default>
</analyzers>
<indexRules jcr:primaryType="nt:unstructured">
<rep:Token jcr:primaryType="nt:unstructured"/>
<nt:base
jcr:primaryType="nt:unstructured"
includePropertyTypes="[String,Binary]">
<properties jcr:primaryType="nt:unstructured">
<analyticsProvider
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="analyticsProvider"/>
<analyticsSnippet
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="analyticsSnippet"/>
<hideInNav
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="hideInNav"/>
<offTime
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="offTime"/>
<onTime
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="onTime"/>
<allowedTemplates
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:allowedTemplates"/>
<childrenOrder
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:childrenOrder"/>
<cugEnabled
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:cugEnabled"/>
<cugPrincipals
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:cugPrincipals"/>
<cugRealm
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:cugRealm"/>
<designPath
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:designPath"/>
<isCancelledForChildren
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:isCancelledForChildren"/>
<isDeep
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:isDeep"/>
<lastModified
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:lastModified"/>
<lastModifiedBy
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:lastModifiedBy"/>
<lastPublished
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:lastPublished"/>
<lastPublishedBy
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:lastPublishedBy"/>
<lastReplicated
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:lastReplicated"/>
<lastReplicatedBy
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:lastReplicatedBy"/>
<lastReplicationAction
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:lastReplicationAction"/>
<lastReplicationStatus
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:lastReplicationStatus"/>
<lastRolledout
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:lastRolledout"/>
<lastRolledoutBy
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:lastRolledoutBy"/>
<name
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:name"/>
<parentPath
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:parentPath"/>
<siblingOrder
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:siblingOrder"/>
<template
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:template"/>
<trigger
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:trigger"/>
<versionComment
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="cq:versionComment"/>
<createdBy
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="jcr:createdBy"/>
<lastModifiedBy_30
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="jcr:lastModifiedBy"/>
<alias
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="sling:alias"/>
<vanityPath
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="sling:vanityPath"/>
<asyncstatus
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="async-status"/>
<asyncstart
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="async-start"/>
<asyncdone
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="async-done"/>
<runtimeId
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="runtimeId"/>
<leaderElectionId
jcr:primaryType="nt:unstructured"
index="{Boolean}false"
name="leaderElectionId"/>
<resourceType
jcr:primaryType="nt:unstructured"
name="sling:resourceType"
propertyIndex="{Boolean}true"
weight="{Long}0"/>
<resourceSuperType
jcr:primaryType="nt:unstructured"
name="sling:resourceSuperType"
propertyIndex="{Boolean}true"
weight="{Long}0"/>
<prop
jcr:primaryType="nt:unstructured"
analyzed="{Boolean}true"
isRegexp="{Boolean}true"
name="^[^\\/]*$"
nodeScopeIndex="{Boolean}true"
useInExcerpt="{Boolean}true"/>
</properties>
</nt:base>
</indexRules>
</lucene>

