@Override public void initialize(@NotNull NodeBuilder builder) { NodeBuilder oakIndex = IndexUtils.getOrCreateOakIndex(builder); addPropIndexDefn(oakIndex, indexedPropName); for (int i = 0; i < numOfIndexes - 1; i++) { addPropIndexDefn(oakIndex, indexedPropName + i); } }
@Override public void initialize(@NotNull NodeBuilder builder) { NodeBuilder index = IndexUtils.getOrCreateOakIndex(builder); IndexUtils.createIndexDefinition(index, "myProp", true, false, ImmutableList.<String>of("myProp"), null); } })
@Override public void initialize(@NotNull NodeBuilder builder) { NodeBuilder index = IndexUtils.getOrCreateOakIndex(builder); IndexUtils.createIndexDefinition( index, "xyz", true, false, ImmutableList.of("x", "y", "z", "w"), null); } })
@Override public void initialize(@NotNull NodeBuilder builder) { createIndexDefinition( getOrCreateOakIndex(builder), "pid", true, false, ImmutableList.of("pid"), null); createIndexDefinition( getOrCreateOakIndex(builder.child("content")), "pid", true, false, ImmutableList.of("pid"), null); } })
@Override public void initialize(@NotNull NodeBuilder builder) { // create index definition for "rep:externalId" and // "rep:externalPrincipalNames" NodeBuilder index = IndexUtils.getOrCreateOakIndex(builder); if (enforceUniqueIds && !index.hasChildNode("externalId")) { NodeBuilder definition = IndexUtils.createIndexDefinition(index, "externalId", true, true, ImmutableList.of(ExternalIdentityConstants.REP_EXTERNAL_ID), null); definition.setProperty("info", "Oak index assuring uniqueness of rep:externalId properties."); } if (!index.hasChildNode("externalPrincipalNames")) { NodeBuilder definition = IndexUtils.createIndexDefinition(index, "externalPrincipalNames", true, false, ImmutableList.of(ExternalIdentityConstants.REP_EXTERNAL_PRINCIPAL_NAMES), null); definition.setProperty("info", "Oak index used by the principal management provided by the external authentication module."); } } }
@Override public void initialize(@NotNull NodeBuilder builder) { NodeBuilder oakIndex = IndexUtils.getOrCreateOakIndex(builder); IndexDefinitionBuilder defnBuilder = new IndexDefinitionBuilder(); defnBuilder.async("async", "async"); defnBuilder.codec("Lucene46"); defnBuilder.indexRule("nt:base") .property(FulltextIndexConstants.REGEX_ALL_PROPS, true) .nodeScopeIndex(); oakIndex.setChildNode("globalIndex", defnBuilder.build()); } }
@Override public void initialize(@NotNull NodeBuilder builder) { NodeBuilder oakIndex = IndexUtils.getOrCreateOakIndex(builder); IndexDefinitionBuilder defnBuilder = new IndexDefinitionBuilder(); defnBuilder.evaluatePathRestrictions(); defnBuilder.async("async", indexingMode, "async"); PropertyRule pr = defnBuilder.indexRule("nt:base").property(indexedPropName).propertyIndex(); if (syncIndexing) { pr.sync(); } if (useOakCodec) { defnBuilder.codec("oakCodec"); } for (int i = 0; i < numOfIndexes - 1; i++) { defnBuilder.indexRule("nt:base").property(indexedPropName + i).propertyIndex(); } oakIndex.setChildNode(indexedPropName, defnBuilder.build()); oakIndex.child(indexedPropName).setProperty("tags", singletonList("fooIndex"), Type.STRINGS); } }
@Override public void initialize(NodeBuilder builder, String workspaceName) { // property index for rep:principalName stored in ACEs NodeBuilder index = IndexUtils.getOrCreateOakIndex(builder); if (!index.hasChildNode("acPrincipalName")) { NodeBuilder acPrincipalName = IndexUtils.createIndexDefinition(index, "acPrincipalName", true, false, ImmutableList.<String>of(REP_PRINCIPAL_NAME), ImmutableList.<String>of(NT_REP_DENY_ACE, NT_REP_GRANT_ACE, NT_REP_ACE)); acPrincipalName.setProperty("info", "Oak index used by authorization to quickly search a principal by name."); } // create the permission store and the root for this workspace. NodeBuilder permissionStore = builder.child(JCR_SYSTEM).child(REP_PERMISSION_STORE); if (!permissionStore.hasProperty(JCR_PRIMARYTYPE)) { permissionStore.setProperty(JCR_PRIMARYTYPE, NT_REP_PERMISSION_STORE, Type.NAME); } if (!permissionStore.hasChildNode(workspaceName)) { permissionStore.child(workspaceName).setProperty(JcrConstants.JCR_PRIMARYTYPE, NT_REP_PERMISSION_STORE, Type.NAME); } for (Mount m : mountInfoProvider.getNonDefaultMounts()) { String permissionRootName = MountPermissionProvider.getPermissionRootName(m, workspaceName); if (!permissionStore.hasChildNode(permissionRootName)) { permissionStore.child(permissionRootName).setProperty(JcrConstants.JCR_PRIMARYTYPE, NT_REP_PERMISSION_STORE, Type.NAME); } } }
@Override public void initialize(NodeBuilder builder, String workspaceName) { // property index for rep:principalName stored in ACEs NodeBuilder index = IndexUtils.getOrCreateOakIndex(builder); if (!index.hasChildNode("acPrincipalName")) { NodeBuilder acPrincipalName = IndexUtils.createIndexDefinition(index, "acPrincipalName", true, false, ImmutableList.<String>of(REP_PRINCIPAL_NAME), ImmutableList.<String>of(NT_REP_DENY_ACE, NT_REP_GRANT_ACE, NT_REP_ACE)); acPrincipalName.setProperty("info", "Oak index used by authorization to quickly search a principal by name."); } // create the permission store and the root for this workspace. NodeBuilder permissionStore = builder.child(JCR_SYSTEM).child(REP_PERMISSION_STORE); if (!permissionStore.hasProperty(JCR_PRIMARYTYPE)) { permissionStore.setProperty(JCR_PRIMARYTYPE, NT_REP_PERMISSION_STORE, Type.NAME); } if (!permissionStore.hasChildNode(workspaceName)) { permissionStore.child(workspaceName).setProperty(JcrConstants.JCR_PRIMARYTYPE, NT_REP_PERMISSION_STORE, Type.NAME); } for (Mount m : mountInfoProvider.getNonDefaultMounts()) { String permissionRootName = MountPermissionProvider.getPermissionRootName(m, workspaceName); if (!permissionStore.hasChildNode(permissionRootName)) { permissionStore.child(permissionRootName).setProperty(JcrConstants.JCR_PRIMARYTYPE, NT_REP_PERMISSION_STORE, Type.NAME); } } }
@Override public void initialize(NodeBuilder builder, String workspaceName) { // property index for rep:principalName stored in ACEs NodeBuilder index = IndexUtils.getOrCreateOakIndex(builder); if (!index.hasChildNode("acPrincipalName")) { NodeBuilder acPrincipalName = IndexUtils.createIndexDefinition(index, "acPrincipalName", true, false, ImmutableList.<String>of(REP_PRINCIPAL_NAME), ImmutableList.<String>of(NT_REP_DENY_ACE, NT_REP_GRANT_ACE, NT_REP_ACE)); acPrincipalName.setProperty("info", "Oak index used by authorization to quickly search a principal by name." ); } // create the permission store and the root for this workspace. NodeBuilder permissionStore = builder.child(JCR_SYSTEM).child(REP_PERMISSION_STORE); if (!permissionStore.hasProperty(JCR_PRIMARYTYPE)) { permissionStore.setProperty(JCR_PRIMARYTYPE, NT_REP_PERMISSION_STORE, Type.NAME); } if (!permissionStore.hasChildNode(workspaceName)) { permissionStore.child(workspaceName).setProperty(JcrConstants.JCR_PRIMARYTYPE, NT_REP_PERMISSION_STORE, Type.NAME); } for (Mount m : mountInfoProvider.getNonDefaultMounts()) { String permissionRootName = MountPermissionProvider.getPermissionRootName(m, workspaceName); if (!permissionStore.hasChildNode(permissionRootName)) { permissionStore.child(permissionRootName).setProperty(JcrConstants.JCR_PRIMARYTYPE, NT_REP_PERMISSION_STORE, Type.NAME); } } }
NodeBuilder lucene = IndexUtils.getOrCreateOakIndex( root ).child( "lucene" ); lucene.setProperty( JcrConstants.JCR_PRIMARYTYPE, "oak:QueryIndexDefinition", Type.NAME );
NodeBuilder index = IndexUtils.getOrCreateOakIndex(builder);
NodeBuilder index = IndexUtils.getOrCreateOakIndex(builder);
NodeBuilder index = IndexUtils.getOrCreateOakIndex(builder);