From 1c3dafc408e744d13c63006cec153e18b05b71f6 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Tue, 13 Aug 2024 10:40:02 +1200 Subject: [PATCH] Fix more tests Signed-off-by: Thomas Farr --- .../NodeSeeders/DefaultSeeder.cs | 20 +- .../ClusterReroute/ClusterRerouteApiTests.cs | 2 +- .../TaskManagement/GetTask/GetTaskApiTests.cs | 4 +- .../TasksList/TasksListApiTests.cs | 2 +- .../DeleteByQuery/DeleteByQueryApiTests.cs | 3 +- .../PutMapping/PutMappingApiTest.cs | 698 +++++++++--------- .../Percolate/PercolateQueryUsageTests.cs | 6 +- 7 files changed, 373 insertions(+), 362 deletions(-) diff --git a/tests/Tests.Core/ManagedOpenSearch/NodeSeeders/DefaultSeeder.cs b/tests/Tests.Core/ManagedOpenSearch/NodeSeeders/DefaultSeeder.cs index fbd9acba66..23cc132c64 100644 --- a/tests/Tests.Core/ManagedOpenSearch/NodeSeeders/DefaultSeeder.cs +++ b/tests/Tests.Core/ManagedOpenSearch/NodeSeeders/DefaultSeeder.cs @@ -219,10 +219,7 @@ private Task CreateDeveloperIndexAsync() => Client.Indices. #pragma warning disable 618 private Task CreateProjectIndexAsync() => Client.Indices.CreateAsync(typeof(Project), c => c - .Settings(settings => settings - .Analysis(ProjectAnalysisSettings) - .Setting("index.knn", true) - .Setting("index.knn.algo_param.ef_search", 100)) + .Settings(ProjectIndexSettings) .Mappings(ProjectMappings) .Aliases(aliases => aliases .Alias(ProjectsAliasName) @@ -263,6 +260,12 @@ public static ITypeMapping ProjectTypeMappings(TypeMappingDescriptor ma return mapping; } + public static IndexSettingsDescriptor ProjectIndexSettings(IndexSettingsDescriptor settings) => + settings + .Analysis(ProjectAnalysisSettings) + .Setting("index.knn", true) + .Setting("index.knn.algo_param.ef_search", 100); + public static IAnalysis ProjectAnalysisSettings(AnalysisDescriptor analysis) { analysis @@ -286,14 +289,11 @@ public static IAnalysis ProjectAnalysisSettings(AnalysisDescriptor analysis) return analysis; } + public static IndexSettingsDescriptor PercolatorIndexSettings(IndexSettingsDescriptor settings) => + ProjectIndexSettings(settings).AutoExpandReplicas("0-all"); private Task CreatePercolatorIndexAsync() => Client.Indices.CreateAsync(typeof(ProjectPercolation), c => c - .Settings(s => s - .AutoExpandReplicas("0-all") - .Analysis(ProjectAnalysisSettings) - .Setting("index.knn", true) - .Setting("index.knn.algo_param.ef_search", 100) - ) + .Settings(PercolatorIndexSettings) .Map(m => m .AutoMap() .Properties(PercolatedQueryProperties) diff --git a/tests/Tests/Cluster/ClusterReroute/ClusterRerouteApiTests.cs b/tests/Tests/Cluster/ClusterReroute/ClusterRerouteApiTests.cs index 82aea6cecd..f81c0c3c6f 100644 --- a/tests/Tests/Cluster/ClusterReroute/ClusterRerouteApiTests.cs +++ b/tests/Tests/Cluster/ClusterReroute/ClusterRerouteApiTests.cs @@ -52,7 +52,7 @@ protected override void IntegrationSetup(IOpenSearchClient client, CallUniqueVal foreach (var (_, index) in values) { var createIndex = client.Indices.Create(index, i => i - .Settings(settings => settings.Analysis(DefaultSeeder.ProjectAnalysisSettings)) + .Settings(DefaultSeeder.ProjectIndexSettings) .Map(DefaultSeeder.ProjectTypeMappings) ); createIndex.ShouldBeValid(); diff --git a/tests/Tests/Cluster/TaskManagement/GetTask/GetTaskApiTests.cs b/tests/Tests/Cluster/TaskManagement/GetTask/GetTaskApiTests.cs index f016434645..b2f8cc472e 100644 --- a/tests/Tests/Cluster/TaskManagement/GetTask/GetTaskApiTests.cs +++ b/tests/Tests/Cluster/TaskManagement/GetTask/GetTaskApiTests.cs @@ -89,7 +89,7 @@ protected override void IntegrationSetup(IOpenSearchClient client, CallUniqueVal throw new Exception("failure in setting up integration"); var createIndex = client.Indices.Create(targetIndex, i => i - .Settings(settings => settings.Analysis(DefaultSeeder.ProjectAnalysisSettings)) + .Settings(DefaultSeeder.ProjectIndexSettings) .Map(DefaultSeeder.ProjectTypeMappings) ); createIndex.ShouldBeValid(); @@ -169,7 +169,7 @@ protected override void IntegrationSetup(IOpenSearchClient client, CallUniqueVal throw new Exception($"failure in setting up integration for {nameof(GetTaskApiCompletedTaskTests)}. {bulkResponse.DebugInformation}"); var createIndex = client.Indices.Create(targetIndex, i => i - .Settings(settings => settings.Analysis(DefaultSeeder.ProjectAnalysisSettings)) + .Settings(DefaultSeeder.ProjectIndexSettings) .Map(DefaultSeeder.ProjectTypeMappings) ); createIndex.ShouldBeValid(); diff --git a/tests/Tests/Cluster/TaskManagement/TasksList/TasksListApiTests.cs b/tests/Tests/Cluster/TaskManagement/TasksList/TasksListApiTests.cs index 1129f90ba6..9b629ed7c2 100644 --- a/tests/Tests/Cluster/TaskManagement/TasksList/TasksListApiTests.cs +++ b/tests/Tests/Cluster/TaskManagement/TasksList/TasksListApiTests.cs @@ -135,7 +135,7 @@ protected override void IntegrationSetup(IOpenSearchClient client, CallUniqueVal client.Indices.Refresh(sourceIndex); var createIndex = client.Indices.Create(targetIndex, i => i - .Settings(settings => settings.Analysis(DefaultSeeder.ProjectAnalysisSettings)) + .Settings(DefaultSeeder.ProjectIndexSettings) .Map(DefaultSeeder.ProjectTypeMappings) ); createIndex.ShouldBeValid(); diff --git a/tests/Tests/Document/Multiple/DeleteByQuery/DeleteByQueryApiTests.cs b/tests/Tests/Document/Multiple/DeleteByQuery/DeleteByQueryApiTests.cs index f9cadbfc03..b76e95a835 100644 --- a/tests/Tests/Document/Multiple/DeleteByQuery/DeleteByQueryApiTests.cs +++ b/tests/Tests/Document/Multiple/DeleteByQuery/DeleteByQueryApiTests.cs @@ -98,10 +98,9 @@ protected override void IntegrationSetup(IOpenSearchClient client, CallUniqueVal foreach (var index in values.Values) { Client.Indices.Create(index, c => c - .Settings(s => s + .Settings(s => DefaultSeeder.ProjectIndexSettings(s) .NumberOfShards(2) .NumberOfReplicas(0) - .Analysis(DefaultSeeder.ProjectAnalysisSettings) ) .Map(p => p .AutoMap() diff --git a/tests/Tests/Indices/MappingManagement/PutMapping/PutMappingApiTest.cs b/tests/Tests/Indices/MappingManagement/PutMapping/PutMappingApiTest.cs index b5cf2f7d07..24817ec8de 100644 --- a/tests/Tests/Indices/MappingManagement/PutMapping/PutMappingApiTest.cs +++ b/tests/Tests/Indices/MappingManagement/PutMapping/PutMappingApiTest.cs @@ -27,7 +27,6 @@ */ using System; -using OpenSearch.OpenSearch.Xunit.XunitPlumbing; using OpenSearch.Net; using OpenSearch.Client; using Tests.Core.ManagedOpenSearch.Clusters; @@ -35,354 +34,369 @@ using Tests.Framework.EndpointTests; using Tests.Framework.EndpointTests.TestState; -namespace Tests.Indices.MappingManagement.PutMapping +namespace Tests.Indices.MappingManagement.PutMapping; + +public class PutMappingApiTests + : ApiIntegrationAgainstNewIndexTestBase + , PutMappingRequest> { - public class PutMappingApiTests - : ApiIntegrationAgainstNewIndexTestBase - , PutMappingRequest> - { - public PutMappingApiTests(WritableCluster cluster, EndpointUsage usage) : base(cluster, usage) { } + public PutMappingApiTests(WritableCluster cluster, EndpointUsage usage) : base(cluster, usage) { } + + protected override bool ExpectIsValid => true; + + protected override object ExpectJson { get; } = new + { + properties = new + { + branches = new + { + fields = new + { + keyword = new + { + type = "keyword", + ignore_above = 256 + } + }, + type = "text" + }, + curatedTags = new + { + properties = new + { + added = new { type = "date" }, + name = new { type = "text" } + }, + type = "object" + }, + type = new { type = "text" }, + dateString = new { type = "text" }, + description = new { type = "text" }, + join = new + { + relations = new { project = "commits" }, + type = "join" + }, + lastActivity = new { type = "date" }, + leadDeveloper = new + { + properties = new + { + firstName = new { type = "text" }, + gender = new { type = "keyword" }, + id = new { type = "long" }, + ipAddress = new { type = "text" }, + jobTitle = new { type = "text" }, + lastName = new { type = "text" }, + location = new { type = "geo_point" }, + nickname = new { type = "text" }, + geoIp = new { type = "object" } + }, + type = "object" + }, + locationPoint = new + { + properties = new + { + lat = new { type = "double" }, + lon = new { type = "double" } + }, + type = "object" + }, + locationShape = new + { + type = "geo_shape" + }, + metadata = new { type = "object" }, + name = new + { + index = false, + type = "text" + }, + numberOfCommits = new { type = "integer" }, + numberOfContributors = new { type = "integer" }, + sourceOnly = new { properties = new { }, type = "object" }, + startedOn = new { type = "date" }, + state = new { type = "keyword" }, + visibility = new { type = "keyword" }, + suggest = new { type = "completion" }, + ranges = new + { + properties = new + { + dates = new { type = "date_range" }, + doubles = new { type = "double_range" }, + floats = new { type = "float_range" }, + integers = new { type = "integer_range" }, + longs = new { type = "long_range" }, + ips = new { type = "ip_range" } + }, + type = "object" + }, + requiredBranches = new + { + type = "integer" + }, + tags = new + { + properties = new + { + added = new { type = "date" }, + name = new { type = "text" } + }, + type = "object" + }, + rank = new + { + type = "rank_feature" + }, + versionControl = new + { + type = "keyword" + }, + vector = new + { + type = "knn_vector", + dimension = 2, + method = new { + name = "hnsw", + space_type = "l2", + engine = "nmslib", + parameters = new + { + ef_construction = 128, + m = 24 + } + } + } + } + }; - protected override bool ExpectIsValid => true; + protected override int ExpectStatusCode => 200; - protected override object ExpectJson { get; } = new - { - properties = new - { - branches = new - { - fields = new - { - keyword = new - { - type = "keyword", - ignore_above = 256 - } - }, - type = "text" - }, - curatedTags = new - { - properties = new - { - added = new { type = "date" }, - name = new { type = "text" } - }, - type = "object" - }, - type = new { type = "text" }, - dateString = new { type = "text" }, - description = new { type = "text" }, - join = new - { - relations = new { project = "commits" }, - type = "join" - }, - lastActivity = new { type = "date" }, - leadDeveloper = new - { - properties = new - { - firstName = new { type = "text" }, - gender = new { type = "keyword" }, - id = new { type = "long" }, - ipAddress = new { type = "text" }, - jobTitle = new { type = "text" }, - lastName = new { type = "text" }, - location = new { type = "geo_point" }, - nickname = new { type = "text" }, - geoIp = new { type = "object" } - }, - type = "object" - }, - locationPoint = new - { - properties = new - { - lat = new { type = "double" }, - lon = new { type = "double" } - }, - type = "object" - }, - locationShape = new - { - type = "geo_shape" - }, - metadata = new { type = "object" }, - name = new - { - index = false, - type = "text" - }, - numberOfCommits = new { type = "integer" }, - numberOfContributors = new { type = "integer" }, - sourceOnly = new { properties = new { }, type = "object" }, - startedOn = new { type = "date" }, - state = new { type = "keyword" }, - visibility = new { type = "keyword" }, - suggest = new { type = "completion" }, - ranges = new - { - properties = new - { - dates = new { type = "date_range" }, - doubles = new { type = "double_range" }, - floats = new { type = "float_range" }, - integers = new { type = "integer_range" }, - longs = new { type = "long_range" }, - ips = new { type = "ip_range" } - }, - type = "object" - }, - requiredBranches = new - { - type = "integer" - }, - tags = new - { - properties = new - { - added = new { type = "date" }, - name = new { type = "text" } - }, - type = "object" - }, - rank = new - { - type = "rank_feature" - }, - versionControl = new - { - type = "keyword" - }, - vector = new - { - type = "knn_vector", - dimension = 2, - method = new { - name = "hnsw", - space_type = "l2", - engine = "nmslib", - parameters = new - { - ef_construction = 128, - m = 24 - } - } - } - } - }; + protected override Func, IPutMappingRequest> Fluent => d => d + .Index(CallIsolatedValue) + .AutoMap() + .Properties(prop => prop + .Join(join => join + .Name(p => p.Join) + .Relations(relations => relations + .Join() + ) + ) + .Object(o => o + .Name(p => p.CuratedTags) + .AutoMap() + .Properties(ps => ps + .Text(t => t + .Name(tag => tag.Name) + ) + ) + ) + .Text(t => t.Name(p => p.Description)) + .Text(t => t.Name(p => p.DateString)) + .Text(t => t.Name(p => p.Type)) + .Text(s => s + .Name(p => p.Name) + .Index(false) + ) + .Object(o => o + .Name(p => p.LeadDeveloper) + .AutoMap() + .Properties(ps => ps + .Text(t => t.Name(dv => dv.FirstName)) + .Text(t => t.Name(dv => dv.IpAddress)) + .Text(t => t.Name(dv => dv.JobTitle)) + .Text(t => t.Name(dv => dv.LastName)) + .Text(t => t.Name(dv => dv.OnlineHandle)) + .Object(t => t.Name(dv => dv.GeoIp)) + ) + ) + .Object(o => o + .Name(p => p.Metadata) + ) + .Object(o => o + .AutoMap() + .Name(p => p.Tags) + .Properties(ps => ps + .Text(t => t + .Name(tag => tag.Name) + ) + ) + ) + .RankFeature(rf => rf + .Name(p => p.Rank) + ) + .Keyword(k => k + .Name(n => n.VersionControl) + ) + .KnnVector(k => k + .Name(p => p.Vector) + .Dimension(2) + .Method(m => m + .Name("hnsw") + .SpaceType("l2") + .Engine("nmslib") + .Parameters(p => p + .Parameter("ef_construction", 128) + .Parameter("m", 24) + ) + ) + ) + ); - protected override int ExpectStatusCode => 200; + protected override HttpMethod HttpMethod => HttpMethod.PUT; - protected override Func, IPutMappingRequest> Fluent => d => d - .Index(CallIsolatedValue) - .AutoMap() - .Properties(prop => prop - .Join(join => join - .Name(p => p.Join) - .Relations(relations => relations - .Join() - ) - ) - .Object(o => o - .Name(p => p.CuratedTags) - .AutoMap() - .Properties(ps => ps - .Text(t => t - .Name(tag => tag.Name) - ) - ) - ) - .Text(t => t.Name(p => p.Description)) - .Text(t => t.Name(p => p.DateString)) - .Text(t => t.Name(p => p.Type)) - .Text(s => s - .Name(p => p.Name) - .Index(false) - ) - .Object(o => o - .Name(p => p.LeadDeveloper) - .AutoMap() - .Properties(ps => ps - .Text(t => t.Name(dv => dv.FirstName)) - .Text(t => t.Name(dv => dv.IpAddress)) - .Text(t => t.Name(dv => dv.JobTitle)) - .Text(t => t.Name(dv => dv.LastName)) - .Text(t => t.Name(dv => dv.OnlineHandle)) - .Object(t => t.Name(dv => dv.GeoIp)) - ) - ) - .Object(o => o - .Name(p => p.Metadata) - ) - .Object(o => o - .AutoMap() - .Name(p => p.Tags) - .Properties(ps => ps - .Text(t => t - .Name(tag => tag.Name) - ) - ) - ) - .RankFeature(rf => rf - .Name(p => p.Rank) - ) - .Keyword(k => k - .Name(n => n.VersionControl) - ) - .KnnVector(k => k - .Name(p => p.Vector) - .Dimension(2) - .Method(m => m - .Name("hnsw") - .SpaceType("l2") - .Engine("nmslib") - .Parameters(p => p - .Parameter("ef_construction", 128) - .Parameter("m", 24) - ) - ) - ) - ); + protected override PutMappingRequest Initializer => new PutMappingRequest(CallIsolatedValue) + { + Properties = new Properties + { + { + p => p.Join, new JoinProperty + { + Relations = new Relations + { + { typeof(Project), typeof(CommitActivity) } + } + } + }, + { + p => p.Branches, new TextProperty + { + Fields = new Properties + { + { + "keyword", new KeywordProperty + { + IgnoreAbove = 256 + } + } + } + } + }, + { + p => p.CuratedTags, new ObjectProperty + { + Properties = new Properties + { + { p => p.Added, new DateProperty() }, + { p => p.Name, new TextProperty() }, + } + } + }, + { p => p.Description, new TextProperty() }, + { p => p.DateString, new TextProperty() }, + { p => p.Type, new TextProperty() }, + { p => p.LastActivity, new DateProperty() }, + { + p => p.LeadDeveloper, new ObjectProperty + { + Properties = new Properties + { + { p => p.FirstName, new TextProperty() }, + { p => p.Gender, new KeywordProperty() }, + { p => p.Id, new NumberProperty(NumberType.Long) }, + { p => p.IpAddress, new TextProperty() }, + { p => p.JobTitle, new TextProperty() }, + { p => p.LastName, new TextProperty() }, + { p => p.Location, new GeoPointProperty() }, + { p => p.OnlineHandle, new TextProperty() }, + { p => p.GeoIp, new ObjectProperty() }, + } + } + }, + { + p => p.LocationPoint, new ObjectProperty + { + Properties = new Properties + { + { p => p.Lat, new NumberProperty(NumberType.Double) }, + { p => p.Lon, new NumberProperty(NumberType.Double) }, + } + } + }, + { p => p.LocationShape, new GeoShapeProperty() }, + { p => p.Metadata, new ObjectProperty() }, + { p => p.Name, new TextProperty { Index = false } }, + { p => p.NumberOfCommits, new NumberProperty(NumberType.Integer) }, + { p => p.NumberOfContributors, new NumberProperty(NumberType.Integer) }, + { + p => p.SourceOnly, new ObjectProperty() + { + Properties = new Properties() + } + }, + { p => p.StartedOn, new DateProperty() }, + { p => p.State, new KeywordProperty() }, + { p => p.Visibility, new KeywordProperty() }, + { p => p.Suggest, new CompletionProperty() }, + { + p => p.Ranges, new ObjectProperty + { + Properties = new Properties + { + { p => p.Dates, new DateRangeProperty() }, + { p => p.Doubles, new DoubleRangeProperty() }, + { p => p.Floats, new FloatRangeProperty() }, + { p => p.Integers, new IntegerRangeProperty() }, + { p => p.Longs, new LongRangeProperty() }, + { p => p.Ips, new IpRangeProperty() }, + } + } + }, + { p => p.RequiredBranches, new NumberProperty(NumberType.Integer) }, + { + p => p.Tags, new ObjectProperty + { + Properties = new Properties + { + { p => p.Added, new DateProperty() }, + { p => p.Name, new TextProperty() }, + } + } + }, + { p => p.Rank, new RankFeatureProperty() }, + { p => p.VersionControl, new KeywordProperty() }, + { p => p.Vector, new KnnVectorProperty + { + Dimension = 2, + Method = new KnnMethod + { + Name = "hnsw", + SpaceType = "l2", + Engine = "nmslib", + Parameters = new KnnMethodParameters + { + {"ef_construction", 128}, + {"m", 24} + } + } + } } + } + }; - protected override HttpMethod HttpMethod => HttpMethod.PUT; + protected override string UrlPath => $"/{CallIsolatedValue}/_mapping"; - protected override PutMappingRequest Initializer => new PutMappingRequest(CallIsolatedValue) - { - Properties = new Properties - { - { - p => p.Join, new JoinProperty - { - Relations = new Relations - { - { typeof(Project), typeof(CommitActivity) } - } - } - }, - { - p => p.Branches, new TextProperty - { - Fields = new Properties - { - { - "keyword", new KeywordProperty - { - IgnoreAbove = 256 - } - } - } - } - }, - { - p => p.CuratedTags, new ObjectProperty - { - Properties = new Properties - { - { p => p.Added, new DateProperty() }, - { p => p.Name, new TextProperty() }, - } - } - }, - { p => p.Description, new TextProperty() }, - { p => p.DateString, new TextProperty() }, - { p => p.Type, new TextProperty() }, - { p => p.LastActivity, new DateProperty() }, - { - p => p.LeadDeveloper, new ObjectProperty - { - Properties = new Properties - { - { p => p.FirstName, new TextProperty() }, - { p => p.Gender, new KeywordProperty() }, - { p => p.Id, new NumberProperty(NumberType.Long) }, - { p => p.IpAddress, new TextProperty() }, - { p => p.JobTitle, new TextProperty() }, - { p => p.LastName, new TextProperty() }, - { p => p.Location, new GeoPointProperty() }, - { p => p.OnlineHandle, new TextProperty() }, - { p => p.GeoIp, new ObjectProperty() }, - } - } - }, - { - p => p.LocationPoint, new ObjectProperty - { - Properties = new Properties - { - { p => p.Lat, new NumberProperty(NumberType.Double) }, - { p => p.Lon, new NumberProperty(NumberType.Double) }, - } - } - }, - { p => p.LocationShape, new GeoShapeProperty() }, - { p => p.Metadata, new ObjectProperty() }, - { p => p.Name, new TextProperty { Index = false } }, - { p => p.NumberOfCommits, new NumberProperty(NumberType.Integer) }, - { p => p.NumberOfContributors, new NumberProperty(NumberType.Integer) }, - { - p => p.SourceOnly, new ObjectProperty() - { - Properties = new Properties() - } - }, - { p => p.StartedOn, new DateProperty() }, - { p => p.State, new KeywordProperty() }, - { p => p.Visibility, new KeywordProperty() }, - { p => p.Suggest, new CompletionProperty() }, - { - p => p.Ranges, new ObjectProperty - { - Properties = new Properties - { - { p => p.Dates, new DateRangeProperty() }, - { p => p.Doubles, new DoubleRangeProperty() }, - { p => p.Floats, new FloatRangeProperty() }, - { p => p.Integers, new IntegerRangeProperty() }, - { p => p.Longs, new LongRangeProperty() }, - { p => p.Ips, new IpRangeProperty() }, - } - } - }, - { p => p.RequiredBranches, new NumberProperty(NumberType.Integer) }, - { - p => p.Tags, new ObjectProperty - { - Properties = new Properties - { - { p => p.Added, new DateProperty() }, - { p => p.Name, new TextProperty() }, - } - } - }, - { p => p.Rank, new RankFeatureProperty() }, - { p => p.VersionControl, new KeywordProperty() }, - { p => p.Vector, new KnnVectorProperty - { - Dimension = 2, - Method = new KnnMethod - { - Name = "hnsw", - SpaceType = "l2", - Engine = "nmslib", - Parameters = new KnnMethodParameters - { - {"ef_construction", 128}, - {"m", 24} - } - } - } } - } - }; + protected override LazyResponses ClientUsage() => Calls( + (client, f) => client.Map(f), + (client, f) => client.MapAsync(f), + (client, r) => client.Map(r), + (client, r) => client.MapAsync(r) + ); - protected override string UrlPath => $"/{CallIsolatedValue}/_mapping"; + protected override void IntegrationSetup(IOpenSearchClient client, CallUniqueValues values) + { + foreach (var v in values.Values) + { + client.Indices.Create(v, d => d + .Settings(s => s + .Setting("index.knn", true) + .Setting("index.knn.algo_param.ef_search", 100))); + } + } - protected override LazyResponses ClientUsage() => Calls( - (client, f) => client.Map(f), - (client, f) => client.MapAsync(f), - (client, r) => client.Map(r), - (client, r) => client.MapAsync(r) - ); - } + protected override void IntegrationTeardown(IOpenSearchClient client, CallUniqueValues values) + { + foreach (var v in values.Values) client.Indices.Delete(v); + } } diff --git a/tests/Tests/QueryDsl/Specialized/Percolate/PercolateQueryUsageTests.cs b/tests/Tests/QueryDsl/Specialized/Percolate/PercolateQueryUsageTests.cs index 64a0005622..d89bbff335 100644 --- a/tests/Tests/QueryDsl/Specialized/Percolate/PercolateQueryUsageTests.cs +++ b/tests/Tests/QueryDsl/Specialized/Percolate/PercolateQueryUsageTests.cs @@ -89,10 +89,9 @@ protected override void IntegrationSetup(IOpenSearchClient client, CallUniqueVal foreach (var index in values.Values) { Client.Indices.Create(index, c => c - .Settings(settings => settings + .Settings(settings => DefaultSeeder.ProjectIndexSettings(settings) .NumberOfShards(1) .NumberOfReplicas(0) - .Analysis(DefaultSeeder.ProjectAnalysisSettings) ) .Map(mm => mm.AutoMap() .Properties(DefaultSeeder.ProjectProperties) @@ -100,10 +99,9 @@ protected override void IntegrationSetup(IOpenSearchClient client, CallUniqueVal ); var percolationIndex = index + "-queries"; Client.Indices.Create(percolationIndex, c => c - .Settings(settings => settings + .Settings(settings => DefaultSeeder.ProjectIndexSettings(settings) .NumberOfShards(1) .NumberOfReplicas(0) - .Analysis(DefaultSeeder.ProjectAnalysisSettings) ) .Map(mm => mm.AutoMap() .Properties(DefaultSeeder.PercolatedQueryProperties)