From 4eba1aaf0f9edde3abc5a048934b9ff64faa0486 Mon Sep 17 00:00:00 2001 From: norareidy Date: Tue, 15 Jul 2025 10:44:58 -0400 Subject: [PATCH] DOCSP-51915: Update SearchAfter example --- .../code-examples/atlas-search/AtlasSearchExamples.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/includes/fundamentals/code-examples/atlas-search/AtlasSearchExamples.cs b/source/includes/fundamentals/code-examples/atlas-search/AtlasSearchExamples.cs index e0c28119..dea94d6f 100644 --- a/source/includes/fundamentals/code-examples/atlas-search/AtlasSearchExamples.cs +++ b/source/includes/fundamentals/code-examples/atlas-search/AtlasSearchExamples.cs @@ -326,7 +326,7 @@ public static List SearchAfter() var searchDefinition = Builders.Search.Text(g => g.Description, "classic"); var searchOptions = new SearchOptions - { IndexName = "default", Sort = Builders.Sort.Ascending(g => g.Id) } + { IndexName = "default", Sort = Builders.Sort.Ascending(g => g.Id) }; // Runs the base search operation var baseSearchResults = guitarsCollection.Aggregate() @@ -339,7 +339,6 @@ public static List SearchAfter() var result = guitarsCollection.Aggregate() .Search(searchDefinition, searchOptions) - .Project(projection) .ToList(); // end-pagination-options