Skip to content

Commit 091cdb6

Browse files
committed
rm feedback
1 parent 3bc0624 commit 091cdb6

File tree

3 files changed

+20
-18
lines changed

3 files changed

+20
-18
lines changed

source/crud/query/project.txt

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ Create a Projection
4444
To create a projection, perform the following steps:
4545

4646
1. Use the ``Builders<TDocument>.Projection`` static property to create a
47-
``ProjectionDefinitionBuilder<TDocument>`` object. The ``ProjectionDefinitionBuilder`` class
48-
provides a type-safe interface for defining a projection. ``TDocument`` represents the
49-
C# class that the collection's documents map to.
47+
``ProjectionDefinitionBuilder<TDocument>`` object, where ``TDocument`` represents the
48+
C# class that the collection's documents map to. The ``ProjectionDefinitionBuilder`` class
49+
provides a type-safe interface for defining a projection.
5050

5151
#. Chain projection methods from the ``ProjectionDefinitionBuilder<TDocument>``
5252
object to specify which fields to include or exclude from the returned documents.
@@ -122,11 +122,11 @@ For a code example that uses the ``Include()`` method, see
122122
Slice
123123
~~~~~
124124

125-
The ``Slice()`` method specifies the number of elements in an array to return in the query
126-
result. This is equivalent to using the ``$slice`` operator in the {+query-api+}.
125+
The ``Slice()`` method specifies the number of elements of a list or array to return in the query
126+
result field. This is equivalent to using the ``$slice`` operator in the {+query-api+}.
127127

128128
The following code example uses the ``Slice()`` method to return the first three elements
129-
of the ``cast`` array in the returned document:
129+
of the ``Cast`` list in the returned document's ``cast`` array:
130130

131131
.. io-code-block::
132132

@@ -152,10 +152,9 @@ of the ``cast`` array in the returned document:
152152
]
153153
}
154154

155-
To return elements from the end of an array, pass a negative integer to the ``Slice()``
156-
method. The method returns the specified number of elements from the end of the array.
157-
The following code example returns the last three elements of the ``cast`` array in the
158-
returned document:
155+
To return elements from the end of a collection, pass a negative integer to the ``Slice()``
156+
method. The following code example returns the last three elements of the ``Cast`` list in
157+
the returned document's ``cast`` array:
159158

160159
.. io-code-block::
161160

@@ -180,10 +179,10 @@ returned document:
180179
]
181180
}
182181

183-
To skip a specified number of elements in the array, pass the number of elements to skip
182+
To skip a specified number of elements in a collection, pass the number of elements to skip
184183
as the first parameter and the number of elements to return as the second
185184
parameter. The following code example skips the first element in the
186-
``cast`` array and returns the next three elements:
185+
``Cast`` list and returns the next three elements in the ``cast`` array:
187186

188187
.. io-code-block::
189188

@@ -316,8 +315,8 @@ The ``MetaSearchScore()`` method includes search scores in the returned
316315
documents. This is equivalent to projecting search scores
317316
by using a ``{ "$meta": "searchScore" }`` object in the {+query-api+}.
318317

319-
The following code example projects each document's search score in a property named
320-
``Score``:
318+
The following code example projects each document's search score in a field named
319+
``score``:
321320

322321
.. io-code-block::
323322

@@ -352,10 +351,10 @@ The ``MetaSearchScoreDetails()`` includes details about the search scores
352351
in the returned documents. This is equivalent to projecting search score details
353352
by using a ``{ "$meta": "searchScoreDetails" }`` object in the {+query-api+}.
354353

355-
To retrieve score details, you must create a ``SearchOptions`` object that, set its
356-
``ScoreDetails`` property to ``true``, and then pass this object to the ``Search()`` method.
354+
To retrieve score details, create a ``SearchOptions`` object with its
355+
``ScoreDetails`` property set to ``true``, and then pass this object to the ``Search()`` method.
357356
The following code example shows this process by projecting each document's search score
358-
details in a property named ``ScoreDetails``:
357+
details in a field named ``searchScoreDetails``:
359358

360359
.. io-code-block::
361360

source/includes/code-examples/projection/MetaExamples.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public static List<BsonDocument> MetaSearchScoreDetailsExample()
138138
.Include(m => m.Title)
139139
.Include(m => m.Plot)
140140
.MetaSearchScore(m => m.Score)
141-
.MetaSearchScoreDetails(m => m.ScoreDetails);
141+
.MetaSearchScoreDetails(m => m.SearchScoreDetails);
142142

143143
var results = movieCollection
144144
.Aggregate()

source/includes/code-examples/projection/Movie.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ public class Movie
1717
[BsonElement("scoreDetails")]
1818
public SearchScoreDetails ScoreDetails { get; set; }
1919

20+
[BsonElement("searchScoreDetails")]
21+
public SearchScoreDetails SearchScoreDetails { get; set; }
22+
2023
[BsonElement("paginationToken")]
2124
public string PaginationToken { get; set; }
2225

0 commit comments

Comments
 (0)