Expand my Community achievements bar.

SOLVED

Indexing data - Indexing Rules

Avatar

Level 3

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)?

1 Accepted Solution

Avatar

Correct answer by
Employee

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.

View solution in original post

4 Replies

Avatar

Correct answer by
Employee

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.

Avatar

Employee Advisor

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

Level 3

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?

Avatar

Employee

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.