diff --git a/examples/local-testing-project/gradle.properties b/examples/local-testing-project/gradle.properties index 24ba20cf9..682b6f783 100644 --- a/examples/local-testing-project/gradle.properties +++ b/examples/local-testing-project/gradle.properties @@ -1,6 +1,6 @@ # Set this to the version you used when running # "gradle -Pversion=(something) publishToMavenLocal" on your local ml-gradle repo -mlGradleVersion=3.3.0 +mlGradleVersion=3.4-beta1 mlHost=localhost mlAppName=example diff --git a/gradle.properties b/gradle.properties index fb068cfa7..28dddb8de 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ group=com.marklogic -version=3.3.1 -mlAppDeployerDependency=com.marklogic:ml-app-deployer:3.3.1 +version=3.4-beta1 +mlAppDeployerDependency=com.marklogic:ml-app-deployer:3.4-beta1 mlcpUtilDependency=com.marklogic:mlcp-util:0.3.0 diff --git a/src/main/groovy/com/marklogic/gradle/MarkLogicPlugin.groovy b/src/main/groovy/com/marklogic/gradle/MarkLogicPlugin.groovy index 1bc46d165..365c482c1 100644 --- a/src/main/groovy/com/marklogic/gradle/MarkLogicPlugin.groovy +++ b/src/main/groovy/com/marklogic/gradle/MarkLogicPlugin.groovy @@ -117,6 +117,7 @@ class MarkLogicPlugin implements Plugin { project.task("mlReindexContentDatabase", type: ReindexContentDatabaseTask, group: dbGroup, description: "Reindex the database named by mlAppConfig.contentDatabaseName") project.task("mlReindexDatabase", type: ReindexDatabaseTask, group: dbGroup, description: "Reindex the database named by the project property dbName; e.g. gradle mlReindexDatabase -PdbName=my-database") project.task("mlSetContentUpdatesAllowed", type: SetContentUpdatesAllowedTask, group: dbGroup, description: "Sets updated-allowed on each primary forest for the content database; must set the mode via e.g. -Pmode=flash-backup") + project.task("mlUpdateIndexes", type: UpdateIndexesTask, group: dbGroup, description: "Update every database by sending a payload that only contains properties related to how data is indexed") String dmGroup = "ml-Gradle Data Movement" String dmMessage = "Run with -PjobProperties (no value needed) for more information." diff --git a/src/main/groovy/com/marklogic/gradle/task/databases/UpdateIndexesTask.groovy b/src/main/groovy/com/marklogic/gradle/task/databases/UpdateIndexesTask.groovy new file mode 100644 index 000000000..95131e673 --- /dev/null +++ b/src/main/groovy/com/marklogic/gradle/task/databases/UpdateIndexesTask.groovy @@ -0,0 +1,72 @@ +package com.marklogic.gradle.task.databases + +import com.marklogic.gradle.task.MarkLogicTask +import org.gradle.api.tasks.TaskAction + +class UpdateIndexesTask extends MarkLogicTask { + + @TaskAction + void updateIndexes() { + getAppConfig().setIncludeProperties( + "database-name", + "stemmed-searches", + "word-searches", + "word-positions", + "fast-phrase-searches", + "fast-reverse-searches", + "triple-index", + "triple-positions", + "fast-case-sensitive-searches", + "fast-diacritic-sensitive-searches", + "fast-element-word-searches", + "element-word-positions", + "fast-element-phrase-searches", + "element-value-positions", + "attribute-value-positions", + "field-value-searches", + "field-value-positions", + "three-character-searches", + "three-character-word-positions", + "fast-element-character-searches", + "trailing-wildcard-searches", + "trailing-wildcard-word-positions", + "fast-element-trailing-wildcard-searches", + "word-lexicon", + "word-lexicons", + "two-character-searches", + "one-character-searches", + "uri-lexicon", + "collection-lexicon", + "element-word-query-through", + "element-word-query-throughs", + "phrase-through", + "phrase-throughs", + "phrase-around", + "phrase-arounds", + "range-element-index", + "range-element-indexes", + "range-element-attribute-index", + "range-element-attribute-indexes", + "range-path-index", + "range-path-indexes", + "range-field-index", + "range-field-indexes", + "field", + "fields", + "geospatial-element-index", + "geospatial-element-indexes", + "geospatial-element-child-index", + "geospatial-element-child-indexes", + "geospatial-element-pair-index", + "geospatial-element-pair-indexes", + "geospatial-element-attribute-pair-index", + "geospatial-element-attribute-pair-indexes", + "geospatial-path-index", + "geospatial-path-indexes", + "geospatial-region-path-index", + "geospatial-region-path-indexes" + ) + + deployWithCommandListProperty("mlDatabaseCommands") + } +}