LuceneIndex issue | Community
Skip to main content
DEBAL_DAS
New Member
May 12, 2017
Solved

LuceneIndex issue

  • May 12, 2017
  • 2 replies
  • 1434 views

Hi ,

I have configured Lucene Full Text Index for /etc/commerce/products/geometrixx-outdoors and here is configuration -

{"jcr:primaryType":"oak:QueryIndexDefinition","compatVersion":2,"type":"lucene","async":"async","reindex":false,"reindexCount":7,"indexRules":{"jcr:primaryType":"nt:unstructured","nt:unstructured":{"jcr:primaryType":"nt:unstructured","properties":{"jcr:primaryType":"nt:unstructured","cqcommerceType":{"jcr:primaryType":"nt:unstructured","nodeScopeIndex":true,"useInSuggest":true,"propertyIndex":true,"useInSpellcheck":true,"name":"nt:unstructured/cq:commerceType","type":"String"}}}}}

While execution of following query: /jcr:root/etc/commerce/products/geometrixx_x002d_outdoors//*[@cq:commerceType='product'] using Explain query , I am getting No indexes were used. This is a traversal query.

Please find the attach file for more details and let me know if I have missed anything.

Thanks,

Debal

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 MC_Stuff

Hi debal,

 Make sure you have the patch https://issues.apache.org/jira/browse/OAK-3156 Or

use nt:base instead of nt:unstructered.

Thanks,

2 replies

MC_Stuff
MC_StuffAccepted solution
Level 10
May 12, 2017

Hi debal,

 Make sure you have the patch https://issues.apache.org/jira/browse/OAK-3156 Or

use nt:base instead of nt:unstructered.

Thanks,

DEBAL_DAS
DEBAL_DASAuthor
New Member
May 13, 2017

Hi,

Thanks for your input. I have used Oak Index Definition Generator and it gave me relevant output for /jcr:root/etc/commerce/products/geometrixx_x002d_outdoors//*[@cq:commerceType='product']

Output-

 - evaluatePathRestrictions = true
  - compatVersion = 2
  - type = "lucene"
  - async = "async"
  - jcr:primaryType = oak:QueryIndexDefinition
  + indexRules 
   + nt:base    (as you suggested)
    + properties 
     + commerceType 
      - name = "cq:commerceType"
      - propertyIndex = true

 

Now, its workingsmiley and  I am getting 

Indexes Used

productCatalogLucene(/oak:index/productCatalogLucene)

Thanks,

Debal

Debal Das, Senior AEM Consultant