Indexing data - Indexing Rules

Avatar

Avatar

tadijam47062732

Avatar

tadijam47062732

tadijam47062732

02-10-2019

Per Lucene documentation, the following is definition of Indexing Rules on oak indexes inside AEM:

Indexing rules defines which types of node and properties are indexed. An index configuration can define one or more indexingRules for different nodeTypes.

However, when I check on indexes created in We Retail project, I can see that there are nodes like this:

/oak:index/lucene/indexRules/nt:base/properties/childrenOrder

Screenshot 2019-10-02 at 12.31.25.png

There is lucene index with many properties inside indexRules node. Every property has attribute index (Boolean) = false. Per Lucene documentation, this means that this property (in this practuculat case childrenOrder) is not indexed.

What is the reason behind this? When we don't want these properties to be indexed, why are they inside the index? If I got this right, there is no sense to put property inside indexRules (to be indexed?), and than put its index value to false (to exclude it from indexing)?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

hamidk92094312

Employee

Avatar

hamidk92094312

Employee

hamidk92094312
Employee

02-10-2019

To my knowledge the "index" property indicates if this property should be indexed which can be used for fulltext index in which some properties may need to be excluded from getting indexed.

Answers (3)

Answers (3)

Avatar

Avatar

jbrar

Employee

Avatar

jbrar

Employee

jbrar
Employee

02-10-2019

I agree with Hamid on this. This is mostly used when you want to explicitly exclude some properties from getting indexed for a fulltext index

You can read more about this at [1]

[1] Jackrabbit Oak – Lucene Index

Avatar

Avatar

sunjot16

Employee

Avatar

sunjot16

Employee

sunjot16
Employee

03-10-2019

I believe you will have to specify each property that you want to index. If you won't define a property inside indexRules/properties, it won't be indexed.

Avatar

Avatar

tadijam47062732

Avatar

tadijam47062732

tadijam47062732

02-10-2019

Does that mean that without these properties defined, these indexes would be indexed?

if the structure is like this:

- lucene

     - aggregates (nt:file)

     - indexRules

          - nt:base

               - properties (nothing inside)

Would then everything that is (or extends) nt:file be indexed (every single property)?

I am not sure if some property is indexed without being defined inside indexRules/properties, or it is OOTB behaviour and then if we want custom behaviour for some properties, we define them inside indexRules only then?