Nested Index

An index can be defined on a nested property to improve performance of nested queries. Nested properties indexing uses an additional attribute - path().
This attribute represents the path of the property within the nested object.

In the example below, the author is a property of type Person which is a property of NewsArticle:

Combining Text and Standard Predicates

Suppose our NewsArticle class contains a articleNumber property as well, and we want to enhance our query and find the NewsArticle with a articleNumber. We can simply add the relevant predicate to the query’s criteria:

If both content and articleNumber are indexed, the index which appears first in the query is the one that will be used. This may significantly effect the performance of your query, so it’s recommended to estimate which index is most efficient for each query and put it first.

Space Document

The text search is also supported with Space Documents. Lets take the above example of the NewsArticle and use it as a SpaceDocument: