Skip to main content
MikolajBuda
New Participant
January 15, 2018

Oak indexing - remove one property from index

  • January 15, 2018
  • 6 replies
  • 2491 views

Hello,

I have following configuration:

{

   "jcr:primaryType":"oak:QueryIndexDefinition",

   "compatVersion":2,

   "name":"cq:Page",

   "type":"lucene",

   "async":"async",

   "reindex":false,

   "reindexCount":4,

   "aggregates":{

      "jcr:primaryType":"nt:unstructured",

      "cq:Page":{

         "jcr:primaryType":"nt:unstructured",

         "include0":{

            "jcr:primaryType":"nt:unstructured",

            "relativeNode":true,

            "path":"jcr:content"

         }

      },

      "nt:file":{

         "jcr:primaryType":"nt:unstructured",

         "include0":{

            "jcr:primaryType":"nt:unstructured",

            "relativeNode":false,

            "path":"jcr:content"

         }

      },

      "cq:PageContent":{

         "jcr:primaryType":"nt:unstructured",

         "include0":{

            "jcr:primaryType":"nt:unstructured",

            "relativeNode":false,

            "path":"*"

         },

         "include1":{

            "jcr:primaryType":"nt:unstructured",

            "relativeNode":false,

            "path":"*/*"

         },

         "include2":{

            "jcr:primaryType":"nt:unstructured",

            "relativeNode":false,

            "path":"*/*/*"

         },

         "include3":{

            "jcr:primaryType":"nt:unstructured",

            "relativeNode":false,

            "path":"*/*/*/*"

         }

      }

   },

   "indexRules":{

      "jcr:primaryType":"nt:unstructured",

      "cq:Page":{

         "jcr:primaryType":"nt:unstructured",

         "properties":{

            "jcrCreated":{

               "jcr:primaryType":"nt:unstructured",

               "nodeScopeIndex":false,

               "propertyIndex":false,

               "analyze":false,

               "name":"jcr:content/jcr:created",

               "type":"Date",

               "index":false,

               "excludeFromAggregation":true

            }

         }

      }

   }

}

However when using search engine still matches with values which are under jcr:created. Is something wrong with this configuration?
It seems the OAK version is 1.2.2 (assumed from OSGi bundles) and AEM is 6.0.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

6 replies

joerghoh
Employee
January 15, 2018

If you have Oak 1.2.2 you are running AEM 6.1 without any service pack. You should change that.

What query do you want to improve with this index definition?

kind regards,

Jörg

MikolajBuda
New Participant
January 16, 2018

The problem is, I do not want to improve anything. I just would like not getting results where page is found as a search result when search text matches eg. milliseconds from cq:lastModified property.

joerghoh
Employee
January 16, 2018

Hi,

ok, you do strange queries then :-)

Anyway, for your index to get picked you need to explicitly exclude a match on jcr:Created; and even then I am not sure if the query engine can handle that.

edubey
New Participant
January 15, 2018

By "search engine" are you referring to search query in AEM or some external search engine like google...?

MikolajBuda
New Participant
January 15, 2018

It is a custom component which executes JCR query built from PredicateGroup. PredicateGroup uses entered text as fulltext property and looks for results in cq:page types.