auto complete suggest search
content structure: content fragment jcr:content, jcr:content/data/master nodes have properties such as jcr:title, tags. see below.


need to get suggestions based on jcr:title , tags.
if jcr:title or tags array contains search term text return a suggestion.
what I tried:
tried with below new oak index only on jcr:title
<testSuggestIndex
jcr:primaryType="oak:QueryIndexDefinition"
async="[async]"
compatVersion="{Long}2"
evaluatePathRestrictions="{Boolean}true"
includedPaths="[/content/dam/sample]"
reindex="{Boolean}false"
reindexCount="{Long}20"
seed="{Long}6707975003957838906"
type="lucene">
<indexRules jcr:primaryType="nt:unstructured">
<dam:Asset jcr:primaryType="nt:unstructured">
<properties jcr:primaryType="nt:unstructured">
<jcrTitle jcr:primaryType="nt:unstructured" boost="{Double}2.0" name="jcr:content/jcr:title" nodeScopeIndex="{Boolean}true" propertyIndex="{Boolean}true" useInSpellcheck="{Boolean}true" useInSuggest="{Boolean}true"/>
</properties>
</dam:Asset>
</indexRules>
<suggest jcr:primaryType="nt:unstructured" suggestUpdateFrequencyMinutes="{Long}1"/>
</testSuggestIndex>
1. contains query
2. rep:suggest query to get suggestions.
SELECT * FROM [dam:Asset] AS s WHERE ISDESCENDANTNODE([/content/dam/sample/faqs]) and CONTAINS(s.*, 'summit')
SELECT [rep:suggest()] FROM [dam:Asset] WHERE SUGGEST('summit') AND ISDESCENDANTNODE('/content/dam/sample/faqs')
both above queries return same results.
But once I added "tags" to oak index definition (see below) , rep:suggest query , contains query returning different number of results. in fact, tags property not seeming to be picked by rep:suggest query.
<testSuggestIndex
jcr:primaryType="oak:QueryIndexDefinition"
async="[async]"
compatVersion="{Long}2"
evaluatePathRestrictions="{Boolean}true"
includedPaths="[/content/dam/sample]"
reindex="{Boolean}false"
type="lucene">
<indexRules jcr:primaryType="nt:unstructured">
<dam:Asset jcr:primaryType="nt:unstructured">
<properties jcr:primaryType="nt:unstructured">
<jcrTitle jcr:primaryType="nt:unstructured" analyzed="{Boolean}true" boost="{Double}2.0" name="jcr:content/jcr:title" nodeScopeIndex="{Boolean}true" propertyIndex="{Boolean}true" useInSpellcheck="{Boolean}true" useInSuggest="{Boolean}true"/>
<modelTags jcr:primaryType="nt:unstructured" analyzed="{Boolean}true" boost="{Double}2.0" name="jcr:content/data/master/tags" nodeScopeIndex="{Boolean}true" propertyIndex="{Boolean}true" useInSpellcheck="{Boolean}true" useInSuggest="{Boolean}true"/>
</properties>
</dam:Asset>
</indexRules>
<suggest jcr:primaryType="nt:unstructured" suggestUpdateFrequencyMinutes="{Long}1"/>
</testSuggestIndex>
at this time, I do not know what is wrong with my oak index definition. I need suggest on multiple properties one property is jcr:title is at jcr:content node level, another property tags is at jcr:content/data/master level as shown in screenshots.
any help is appreciated, I looked at several blogs and tried this but suggest not seeming to pick tags property on all nodes.
note: every time I changed index definition, reindex done as well.
Thanks,
Sri