Index not getting picked | Community
Skip to main content
New Participant
January 17, 2023
Solved

Index not getting picked

  • January 17, 2023
  • 1 reply
  • 757 views

Hi all,

 

We are getting some "WARN" in the logs withe the suggestions to create custom index for graphQL query persistent queries. One such query: select * from [nt:unstructured] where isdescendantnode('/conf') and [jcr:path] like '/conf/%/settings/graphql/persistentQueries/%' and [sling:resourceType]='graphql/persistent/query' and (contains(*, 'adventureByPath') or contains(*, 'adventureList')) order by [jcr:path] option(index tag graphqlConfig)

 

I tried "https://oakutils.appspot.com/generate/index" to get the index definition and created the query as per suggestion but it is not getting picked.

 

<myIndex compatVersion="{Long}2" async="async" jcr:primaryType="oak:QueryIndexDefinition" evaluatePathRestrictions="{Boolean}true" type="lucene">
<indexRules jcr:primaryType="nt:unstructured">
<nt:unstructured jcr:primaryType="nt:unstructured">
<properties jcr:primaryType="nt:unstructured">
<path name="jcr:path" ordered="{Boolean}true" jcr:primaryType="nt:unstructured"/>
<resourceType name="sling:resourceType" propertyIndex="{Boolean}true" jcr:primaryType="nt:unstructured"/>
</properties>
</nt:unstructured>
</indexRules>
</myIndex>

 

After going through the "https://jackrabbit.apache.org/oak/docs/query/query-engine.html#index-selection-policy" link, I tried giving "selectionPolicy" and "tag" but still it is not getting picked.

 

<graphqlConfig
jcr:primaryType="oak:QueryIndexDefinition"
async="[async,nrt]"
compatVersion="{Long}2"
evaluatePathRestrictions="{Boolean}true"
includedPaths="[/conf]"
name="graphqlConfig"
queryPaths="[/conf]"
reindex="{Boolean}false"
seed="{Long}-4703725553994086635"
selectionPolicy="tag"
tags="[graphqlConfig]"
type="lucene">
<indexRules jcr:primaryType="nt:unstructured">
<nt:unstructured jcr:primaryType="nt:unstructured">
<properties jcr:primaryType="nt:unstructured">
<jcr:path
jcr:primaryType="nt:unstructured"
name="jcr:path"
ordered="{Boolean}true"/>
<sling:resourceType
jcr:primaryType="nt:unstructured"
name="sling:resourceType"
propertyIndex="{Boolean}true"/>
</properties>
</nt:unstructured>
</indexRules>
</graphqlConfig>

 

Please advise what am I missing here.

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 Shashi_Mulugu

@nitish-jain Hi Nitish, looks like it is a full text search? So you may need to configure a Apache Lucene index accordingly.. Try out..

https://experienceleague.adobe.com/docs/experience-manager-64/deploying/deploying/queries-and-indexing.html?lang=en

 

But somewhere I feel, that should be provided by Adobe package by default and we don't need to create indexes. But cross validate once

1 reply

Shashi_Mulugu
Shashi_MuluguAccepted solution
New Participant
January 21, 2023

@nitish-jain Hi Nitish, looks like it is a full text search? So you may need to configure a Apache Lucene index accordingly.. Try out..

https://experienceleague.adobe.com/docs/experience-manager-64/deploying/deploying/queries-and-indexing.html?lang=en

 

But somewhere I feel, that should be provided by Adobe package by default and we don't need to create indexes. But cross validate once