Skip to content

Commit ca0ebcc

Browse files
committed
rename join helper on querydescriptor
1 parent 01b87f2 commit ca0ebcc

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Nest/QueryDsl/Abstractions/Container/QueryContainerDescriptor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,11 @@ public QueryContainer Term(Expression<Func<T, object>> field, object value, doub
330330
/// <summary>
331331
/// Helper method to easily filter on join relations
332332
/// </summary>
333-
public QueryContainer Join(Expression<Func<T, JoinField>> field, RelationName value) =>
333+
public QueryContainer HasRelationName(Expression<Func<T, JoinField>> field, RelationName value) =>
334334
this.Term(t => t.Field(field).Value(value));
335335

336336
/// <summary>Helper method to easily filter on join relations</summary>
337-
public QueryContainer Join<TRelation>(Expression<Func<T, JoinField>> field) =>
337+
public QueryContainer HasRelationName<TRelation>(Expression<Func<T, JoinField>> field) =>
338338
this.Term(t => t.Field(field).Value(Infer.Relation<TRelation>()));
339339

340340
/// <summary>

src/Tests/Document/Multiple/Reindex/ReindexApiTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,11 @@ private void ReindexManyTypesCompleted(CountdownEvent handle)
157157

158158
var originalIndexCount = this._client.Count<CommitActivity>(c => c
159159
.Index(IndexName)
160-
.Query(q => q.Join<CommitActivity>(p => p.Join))
160+
.Query(q => q.HasRelationName<CommitActivity>(p => p.Join))
161161
);
162162
var newIndexCount = this._client.Count<CommitActivity>(c => c
163163
.Index(NewManyTypesIndexName)
164-
.Query(q => q.Join<CommitActivity>(p => p.Join))
164+
.Query(q => q.HasRelationName<CommitActivity>(p => p.Join))
165165
);
166166

167167
originalIndexCount.Count.Should().BeGreaterThan(0).And.Be(newIndexCount.Count);
@@ -171,7 +171,7 @@ private void ReindexManyTypesCompleted(CountdownEvent handle)
171171
.Index(NewManyTypesIndexName)
172172
.From(0)
173173
.Size(100)
174-
.Query(q => q.Join<CommitActivity>(p=>p.Join))
174+
.Query(q => q.HasRelationName<CommitActivity>(p=>p.Join))
175175
.Scroll(scroll)
176176
);
177177

@@ -201,12 +201,12 @@ private void ProjectionCompleted(CountdownEvent handle)
201201
var refresh = this._client.Refresh(NewProjectionIndex);
202202
var originalIndexCount = this._client.Count<CommitActivity>(c => c
203203
.Index(IndexName)
204-
.Query(q=>q.Join<CommitActivity>(p => p.Join))
204+
.Query(q=>q.HasRelationName<CommitActivity>(p => p.Join))
205205
);
206206

207207
var newIndexSearch = this._client.Search<CommitActivity>(c => c
208208
.Index(NewProjectionIndex)
209-
.Query(q=>q.Join<CommitActivity>(p => p.Join))
209+
.Query(q=>q.HasRelationName<CommitActivity>(p => p.Join))
210210
);
211211

212212
originalIndexCount.Count.Should().BeGreaterThan(0).And.Be(newIndexSearch.Total);

0 commit comments

Comments
 (0)