Skip to content

Commit 47b81ce

Browse files
committed
pr comments
1 parent 6233740 commit 47b81ce

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/MongoDB.Driver/Core/Misc/Feature.cs

+6
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public class Feature
6363
private static readonly Feature __filterLimit = new Feature("FilterLimit", WireVersion.Server60);
6464
private static readonly Feature __findAllowDiskUse = new Feature("FindAllowDiskUse", WireVersion.Server44);
6565
private static readonly Feature __findProjectionExpressions = new Feature("FindProjectionExpressions", WireVersion.Server44);
66+
private static readonly Feature __geoNearCommand = new Feature("GeoNearCommand", WireVersion.Zero, WireVersion.Server42);
6667
private static readonly Feature __getField = new Feature("GetField", WireVersion.Server50);
6768
private static readonly Feature __getMoreComment = new Feature("GetMoreComment", WireVersion.Server44);
6869
private static readonly Feature __groupCommand = new Feature("GroupCommand", WireVersion.Zero, WireVersion.Server42);
@@ -287,6 +288,11 @@ public class Feature
287288
/// </summary>
288289
public static Feature FindProjectionExpressions => __findProjectionExpressions;
289290

291+
/// <summary>
292+
/// Gets the geoNear command feature.
293+
/// </summary>
294+
public static Feature GeoNearCommand => __geoNearCommand;
295+
290296
/// <summary>
291297
/// Gets the getField feature.
292298
/// </summary>

src/MongoDB.Driver/PipelineStageDefinitionBuilder.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ public static PipelineStageDefinition<TInput, TOutput> Facet<TInput, TOutput>(
614614
/// <param name="near">The point for which to find the closest documents.</param>
615615
/// <param name="options">The options.</param>
616616
/// <returns>The stage.</returns>
617-
internal static PipelineStageDefinition<TInput, TOutput> GeoNear<TInput, TPoint, TOutput>(
617+
private static PipelineStageDefinition<TInput, TOutput> GeoNear<TInput, TPoint, TOutput>(
618618
TPoint near,
619619
GeoNearOptions<TInput, TOutput> options = null)
620620
// where TPoint is either a GeoJsonPoint or a legacy coordinate array

tests/MongoDB.Driver.Tests/AggregateGeoNearTests.cs

-6
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ public void GeoNear_omitting_distanceField_should_return_expected_result()
3434
RequireServer.Check().VersionGreaterThanOrEqualTo("8.1.0");
3535

3636
var collection = Fixture.GeoCollection;
37-
38-
collection.Indexes.CreateOne(new CreateIndexModel<Place>(Builders<Place>.IndexKeys.Geo2DSphere(p => p.GeoJsonPointLocation)));
39-
4037
var result = collection
4138
.Aggregate()
4239
.GeoNear(
@@ -59,9 +56,6 @@ public void GeoNear_omitting_distanceField_should_return_expected_result()
5956
public void GeoNear_using_pipeline_should_return_expected_result()
6057
{
6158
var collection = Fixture.GeoCollection;
62-
63-
collection.Indexes.CreateOne(new CreateIndexModel<Place>(Builders<Place>.IndexKeys.Geo2D(p => p.LegacyCoordinateLocation)));
64-
6559
var pipeline = new EmptyPipelineDefinition<Place>()
6660
.GeoNear(
6761
[-73.99279, 40.719296],

0 commit comments

Comments
 (0)