public static class OakIndexUtils.PropertyIndex
extends java.lang.Object
Constructor and Description |
---|
PropertyIndex() |
Modifier and Type | Method and Description |
---|---|
@Nullable Node |
create(Session session)
Create the index.
|
@Nullable Node |
create(Session session,
java.lang.String indexType) |
OakIndexUtils.PropertyIndex |
name(java.lang.String indexName)
Set the index name.
|
OakIndexUtils.PropertyIndex |
nodeTypes(java.lang.String... nodeTypeNames)
Restrict the node types.
|
OakIndexUtils.PropertyIndex |
property(java.lang.String propertyName)
Set the property name.
|
public OakIndexUtils.PropertyIndex name(java.lang.String indexName)
indexName
- the index namepublic OakIndexUtils.PropertyIndex property(java.lang.String propertyName)
propertyName
- the property namepublic OakIndexUtils.PropertyIndex nodeTypes(java.lang.String... nodeTypeNames)
nodeTypeNames
- the list of declaring node types@Nullable public @Nullable Node create(Session session) throws RepositoryException
If this is not a Oak repository, this method does nothing.
If a matching index already exists, this method verifies that the definition matches. If no such index exists, a new one is created.
session
- the session to use for creating the indexRepositoryException
- if writing to the repository failed, the
index definition is incorrect, or if such an index exists
but is not compatible with this definition (for example,
a different property is indexed)@Nullable public @Nullable Node create(Session session, java.lang.String indexType) throws RepositoryException
RepositoryException
Copyright © 2012–2022 The Apache Software Foundation. All rights reserved.