Skip to content

Commit

Permalink
Move synonym analyzer REST tests to synonyms API
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelest committed Jul 12, 2023
1 parent 9f501a2 commit b13a99a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/analysis-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ esplugin {

restResources {
restApi {
include '_common', 'indices', 'index', 'cluster', 'search', 'nodes', 'bulk', 'termvectors', 'explain', 'count', 'synonyms.put', 'synonyms.delete', 'synonym_rule.put'
include '_common', 'indices', 'index', 'cluster', 'search', 'nodes', 'bulk', 'termvectors', 'explain', 'count'
}
}

Expand Down
1 change: 1 addition & 0 deletions rest-api-spec/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ dependencies {
clusterModules project(":modules:mapper-extras")
clusterModules project(":modules:rest-root")
clusterModules project(":modules:reindex")
clusterModules project(':modules:analysis-common')
}

testClusters.configureEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class ClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
.module("mapper-extras")
.module("rest-root")
.module("reindex")
.module("analysis-common")
.feature(FeatureFlag.TIME_SERIES_MODE)
.feature(FeatureFlag.DATA_STREAM_LIFECYCLE_ENABLED)
.feature(FeatureFlag.SYNONYMS_ENABLED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,12 @@ public class InternalUsers {
UsernamesField.SYNONYMS_ROLE_NAME,
null,
new RoleDescriptor.IndicesPrivileges[] {
RoleDescriptor.IndicesPrivileges.builder().indices(".synonyms*").privileges("all").allowRestrictedIndices(true).build() },
RoleDescriptor.IndicesPrivileges.builder()
.indices(".synonyms*").privileges("all").allowRestrictedIndices(true).build()
// Need manage privilege to be able to reload index analyzers for all indices
// RoleDescriptor.IndicesPrivileges.builder()
// .indices("*").privileges("manage").build(),
},
null,
null,
null,
Expand Down

0 comments on commit b13a99a

Please sign in to comment.