Skip to content

Commit 7c7b0f8

Browse files
committed
- PR comments
1 parent fee61f3 commit 7c7b0f8

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

src/MongoDB.Driver/Search/OperatorSearchDefinitions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ internal sealed class GeoShapeSearchDefinition<TDocument, TCoordinates> : Operat
141141

142142
public GeoShapeSearchDefinition(
143143
SearchPathDefinition<TDocument> path,
144-
GeoJsonGeometry<TCoordinates> geometry,
145144
GeoShapeRelation relation,
145+
GeoJsonGeometry<TCoordinates> geometry,
146146
SearchScoreDefinition<TDocument> score)
147147
: base(OperatorType.GeoShape, path, score)
148148
{

src/MongoDB.Driver/Search/SearchDefinitionBuilder.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,11 @@ public SearchDefinition<TDocument> Facet(
185185
/// <returns>A geo shape search definition.</returns>
186186
public SearchDefinition<TDocument> GeoShape<TCoordinates>(
187187
SearchPathDefinition<TDocument> path,
188-
GeoJsonGeometry<TCoordinates> geometry,
189188
GeoShapeRelation relation,
189+
GeoJsonGeometry<TCoordinates> geometry,
190190
SearchScoreDefinition<TDocument> score = null)
191191
where TCoordinates : GeoJsonCoordinates =>
192-
new GeoShapeSearchDefinition<TDocument, TCoordinates>(path, geometry, relation, score);
192+
new GeoShapeSearchDefinition<TDocument, TCoordinates>(path, relation, geometry, score);
193193

194194
/// <summary>
195195
/// Creates a search definition that queries for shapes with a given geometry.
@@ -208,14 +208,14 @@ public SearchDefinition<TDocument> GeoShape<TCoordinates>(
208208
/// <returns>A geo shape search definition.</returns>
209209
public SearchDefinition<TDocument> GeoShape<TCoordinates, TField>(
210210
Expression<Func<TDocument, TField>> path,
211-
GeoJsonGeometry<TCoordinates> geometry,
212211
GeoShapeRelation relation,
212+
GeoJsonGeometry<TCoordinates> geometry,
213213
SearchScoreDefinition<TDocument> score = null)
214214
where TCoordinates : GeoJsonCoordinates =>
215215
GeoShape(
216216
new ExpressionFieldDefinition<TDocument>(path),
217-
geometry,
218217
relation,
218+
geometry,
219219
score);
220220

221221
/// <summary>

tests/MongoDB.Driver.Tests/Search/AtlasSearchTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ public void GeoShape()
167167
var results = GeoSearch(
168168
GeoBuilders.Search.GeoShape(
169169
x => x.Address.Location,
170-
__testPolygon,
171-
GeoShapeRelation.Intersects));
170+
GeoShapeRelation.Intersects,
171+
__testPolygon));
172172

173173
results.Count.Should().Be(25);
174174
results.First().Name.Should().Be("Ribeira Charming Duplex");

tests/MongoDB.Driver.Tests/Search/SearchDefinitionBuilderTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@ public void GeoShape()
297297
AssertRendered(
298298
subject.GeoShape(
299299
"location",
300-
__testPolygon,
301-
GeoShapeRelation.Disjoint),
300+
GeoShapeRelation.Disjoint,
301+
__testPolygon),
302302
"{ geoShape: { geometry: { type: 'Polygon', coordinates: [[[-161.323242, 22.512557], [-152.446289, 22.065278], [-156.09375, 17.811456], [-161.323242, 22.512557]]] }, path: 'location', relation: 'disjoint' } }");
303303
}
304304

@@ -310,14 +310,14 @@ public void GeoShape_typed()
310310
AssertRendered(
311311
subject.GeoShape(
312312
x => x.Location,
313-
__testPolygon,
314-
GeoShapeRelation.Disjoint),
313+
GeoShapeRelation.Disjoint,
314+
__testPolygon),
315315
"{ geoShape: { geometry: { type: 'Polygon', coordinates: [[[-161.323242, 22.512557], [-152.446289, 22.065278], [-156.09375, 17.811456], [-161.323242, 22.512557]]] }, path: 'location', relation: 'disjoint' } }");
316316
AssertRendered(
317317
subject.GeoShape(
318318
"Location",
319-
__testPolygon,
320-
GeoShapeRelation.Disjoint),
319+
GeoShapeRelation.Disjoint,
320+
__testPolygon),
321321
"{ geoShape: { geometry: { type: 'Polygon', coordinates: [[[-161.323242, 22.512557], [-152.446289, 22.065278], [-156.09375, 17.811456], [-161.323242, 22.512557]]] }, path: 'location', relation: 'disjoint' } }");
322322
}
323323

0 commit comments

Comments
 (0)