Hello Everyone,
I am trying to create a property index at the project level where the path would be content/project/oak:index
The same index if kept in the default oak:index folder gets picked up for all the queries. But if i have it in the project folder it doesnt.
Any idea why?
Thank you so much!
Views
Replies
Total Likes
Could you share the index definition? It should work at your project level /content/project/oak:index
Views
Replies
Total Likes
OAK index has specific standards to make it work. I recommend that you watch this GEMS session.
Views
Replies
Total Likes
We have Lucene indexes at the same level and they are working fine. This one is a single property index.
Views
Replies
Total Likes
Here is the index xml
<oak:index jcr:primaryType="nt:unstructured">
jcr:primaryType="oak:QueryIndexDefinition"
info="Oak Index used for searching by email"
propertyNames="{Name}[email]"
reindex="{Boolean}false"
reindexCount="{Long}3"
type="property"
unique="{Boolean}false"/>
</oak:index>
Views
Replies
Total Likes
Below are the screenshots. What message do you get in your case? Does it generate the stats?
*INFO* [qtp175495745-1958] org.apache.jackrabbit.oak.plugins.index.IndexUpdate Indexing report
- /content/we-retail/oak:index/myNodeApps*(4)
Views
Replies
Total Likes
You need to limit the query explicitly to that folder (as outlined in the example of gauravd83019631).
Your approach is possible but In most cases even project indexes are dropped into /oak:index.
Views
Replies
Total Likes
i am using
select * from [nt:base] as a where isdescendantnode(a, '/content/project') and a.[email]='test@test.com'
but it says
Views
Replies
Total Likes
It does generate the stats but says that no indexes are used, this is a traversal query.
Views
Replies
Total Likes
Did you get a chance to check screenshots posted above?
1) Check if the index is picked up and no issues with syntax -
http://localhost:4502/libs/granite/operations/content/diagnosistools/indexManager.html
2) Add 'nodeTypeListDefined' and 'declaringNodeTypes', if you want to restrict it to certain nodes for lower cost
3) Check if index stats are getting generated, perform reindex and check the logs -
4) Check the permissions on this path /content/project/oak:index - the service users should have read permissions, if not already available.
Refer - Jackrabbit Oak – The Property Index
Views
Replies
Total Likes