@@ -131,7 +131,9 @@ public static SortDefinition<TDocument> MetaTextScore<TDocument>(this SortDefini
131
131
public sealed class SortDefinitionBuilder < TDocument >
132
132
{
133
133
/// <summary>
134
- /// Creates a value ascending sort.
134
+ /// Creates a value ascending sort that sorts documents by their entire document value. For example, "$sort: 1"
135
+ /// This is typically used when documents are simple values (like strings, numbers, or dates)
136
+ /// rather than complex objects with multiple fields.
135
137
/// </summary>
136
138
/// <returns>A value ascending sort.</returns>
137
139
public SortDefinition < TDocument > Ascending ( )
@@ -140,7 +142,8 @@ public SortDefinition<TDocument> Ascending()
140
142
}
141
143
142
144
/// <summary>
143
- /// Creates an ascending sort.
145
+ /// Creates an ascending sort based on a specific field within the document. For example, "$sort: {field: 1}"
146
+ /// This is used when documents are complex objects, and you want to sort by a particular field's value.
144
147
/// </summary>
145
148
/// <param name="field">The field.</param>
146
149
/// <returns>An ascending sort.</returns>
@@ -150,7 +153,8 @@ public SortDefinition<TDocument> Ascending(FieldDefinition<TDocument> field)
150
153
}
151
154
152
155
/// <summary>
153
- /// Creates an ascending sort.
156
+ /// Creates an ascending sort based on a specific field within the document. For example, "$sort: {field: 1}"
157
+ /// This is used when documents are complex objects, and you want to sort by a particular field's value.
154
158
/// </summary>
155
159
/// <param name="field">The field.</param>
156
160
/// <returns>An ascending sort.</returns>
@@ -180,7 +184,9 @@ public SortDefinition<TDocument> Combine(IEnumerable<SortDefinition<TDocument>>
180
184
}
181
185
182
186
/// <summary>
183
- /// Creates a value descending sort.
187
+ /// Creates a value descending sort that sorts documents by their entire document value. For example, "$sort: -1"
188
+ /// This is typically used when documents are simple values (like strings, numbers, or dates)
189
+ /// rather than complex objects with multiple fields.
184
190
/// </summary>
185
191
/// <returns>A value descending sort.</returns>
186
192
public SortDefinition < TDocument > Descending ( )
@@ -189,7 +195,8 @@ public SortDefinition<TDocument> Descending()
189
195
}
190
196
191
197
/// <summary>
192
- /// Creates a descending sort.
198
+ /// Creates a descending sort based on a specific field within the document. For example, "$sort: {field: -1}"
199
+ /// This is used when documents are complex objects, and you want to sort by a particular field's value.
193
200
/// </summary>
194
201
/// <param name="field">The field.</param>
195
202
/// <returns>A descending sort.</returns>
@@ -199,7 +206,8 @@ public SortDefinition<TDocument> Descending(FieldDefinition<TDocument> field)
199
206
}
200
207
201
208
/// <summary>
202
- /// Creates a descending sort.
209
+ /// Creates a descending sort based on a specific field within the document. For example, "$sort: {field: -1}"
210
+ /// This is used when documents are complex objects, and you want to sort by a particular field's value.
203
211
/// </summary>
204
212
/// <param name="field">The field.</param>
205
213
/// <returns>A descending sort.</returns>
0 commit comments