Extension of the Property index will keep the order of the indexed property persisted in the repository.
Used to speed-up queries with ORDER BY
clause, equality and range ones.
SELECT * FROM [nt:base] ORDER BY jcr:lastModified SELECT * FROM [nt:base] WHERE jcr:lastModified > $date SELECT * FROM [nt:base] WHERE jcr:lastModified < $date SELECT * FROM [nt:base] WHERE jcr:lastModified > $date1 AND jcr:lastModified < $date2 SELECT * FROM [nt:base] WHERE [jcr:uuid] = $id
To define a property index on a subtree you have to add an index definition node that:
oak:QueryIndexDefinition
type
property set to ordered
propertyNames
property that indicates what properties will be stored in the index. propertyNames
has to be a single value list of type Name[]
Optionally you can specify
reindex
flag which when set to true
, triggers a full content re-index.direction
property of type String
of value ascending
or descending
. If not provided ascending
is the default.async=async
Caveats
async=async
in the index definition. This is to avoid cluster merges.