Skip to content

Commit 9cbf143

Browse files
Mpdreamzrusscam
authored andcommitted
Fixed multisearch integration not including routing key for project lookup in the percolation query
(cherry picked from commit 81f29b6)
1 parent d3bff50 commit 9cbf143

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Tests/Tests/Search/MultiSearch/MultiSearchApiTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected override LazyResponses ClientUsage() => Calls(
4949
new { index = "queries", type = PercolatorType },
5050
new { query = new { percolate = new { document = Project.InstanceAnonymous, field = "query" , routing = Project.First.Name } } },
5151
new { index = "queries", type = PercolatorType },
52-
new { query = new { percolate = new { index = "project", type = "doc", id = Project.First.Name, version = 1, field = "query" } } },
52+
new { query = new { percolate = new { index = "project", type = "doc", id = Project.First.Name, version = 1, field = "query", routing = Project.First.Name } } },
5353
};
5454

5555
protected override Func<MultiSearchDescriptor, IMultiSearchRequest> Fluent => ms => ms
@@ -76,6 +76,7 @@ protected override LazyResponses ClientUsage() => Calls(
7676
.Type<Project>()
7777
.Id(Project.First.Name)
7878
.Version(1)
79+
.Routing(Project.First.Name)
7980
.Field(f => f.Query)
8081
)
8182
)
@@ -106,6 +107,7 @@ protected override LazyResponses ClientUsage() => Calls(
106107
Type = typeof(Project),
107108
Id = Project.First.Name,
108109
Version = 1,
110+
Routing = Project.First.Name,
109111
Field = Infer.Field<ProjectPercolation>(f => f.Query)
110112
})
111113
}

0 commit comments

Comments
 (0)