Skip to content

Commit 4eba1aa

Browse files
committed
DOCSP-51915: Update SearchAfter example
1 parent a43f419 commit 4eba1aa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

source/includes/fundamentals/code-examples/atlas-search/AtlasSearchExamples.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ public static List<Guitar> SearchAfter()
326326

327327
var searchDefinition = Builders<Guitar>.Search.Text(g => g.Description, "classic");
328328
var searchOptions = new SearchOptions<Guitar>
329-
{ IndexName = "default", Sort = Builders<Guitar>.Sort.Ascending(g => g.Id) }
329+
{ IndexName = "default", Sort = Builders<Guitar>.Sort.Ascending(g => g.Id) };
330330

331331
// Runs the base search operation
332332
var baseSearchResults = guitarsCollection.Aggregate()
@@ -339,7 +339,6 @@ public static List<Guitar> SearchAfter()
339339

340340
var result = guitarsCollection.Aggregate()
341341
.Search(searchDefinition, searchOptions)
342-
.Project<Guitar>(projection)
343342
.ToList();
344343
// end-pagination-options
345344

0 commit comments

Comments
 (0)