@@ -111,7 +111,7 @@ public SearchDefinition<TDocument> EmbeddedDocument<TField>(
111
111
/// <summary>
112
112
/// Creates a search definition that queries for documents where an indexed field is equal
113
113
/// to the specified value.
114
- /// Supported value types are boolean, numeric, ObjectId and date .
114
+ /// Supported value types are boolean, numeric, ObjectId, date and string .
115
115
/// </summary>
116
116
/// <typeparam name="TField">The type of the field.</typeparam>
117
117
/// <param name="path">The indexed field to search.</param>
@@ -121,14 +121,13 @@ public SearchDefinition<TDocument> EmbeddedDocument<TField>(
121
121
public SearchDefinition < TDocument > Equals < TField > (
122
122
FieldDefinition < TDocument , TField > path ,
123
123
TField value ,
124
- SearchScoreDefinition < TDocument > score = null )
125
- where TField : struct , IComparable < TField > =>
124
+ SearchScoreDefinition < TDocument > score = null ) =>
126
125
new EqualsSearchDefinition < TDocument , TField > ( path , value , score ) ;
127
126
128
127
/// <summary>
129
128
/// Creates a search definition that queries for documents where an indexed field is equal
130
129
/// to the specified value.
131
- /// Supported value types are boolean, numeric, ObjectId and date .
130
+ /// Supported value types are boolean, numeric, ObjectId, date and string .
132
131
/// </summary>
133
132
/// <typeparam name="TField">The type of the field.</typeparam>
134
133
/// <param name="path">The indexed field to search.</param>
@@ -138,9 +137,25 @@ public SearchDefinition<TDocument> Equals<TField>(
138
137
public SearchDefinition < TDocument > Equals < TField > (
139
138
Expression < Func < TDocument , TField > > path ,
140
139
TField value ,
141
- SearchScoreDefinition < TDocument > score = null )
142
- where TField : struct , IComparable < TField > =>
140
+ SearchScoreDefinition < TDocument > score = null ) =>
143
141
Equals ( new ExpressionFieldDefinition < TDocument , TField > ( path ) , value , score ) ;
142
+
143
+ /// <summary>
144
+ /// Creates a search definition that queries for documents where at least one element in an indexed array field is equal
145
+ /// to the specified value.
146
+ /// Supported value types are boolean, numeric, ObjectId, date and string.
147
+ /// </summary>
148
+ /// <typeparam name="TField">The type of elements contained in the indexed array field.</typeparam>
149
+ /// <param name="path">The indexed array field to search.</param>
150
+ /// <param name="value">The value to query for.</param>
151
+ /// <param name="score">The score modifier.</param>
152
+ /// <returns>An equality search definition.</returns>
153
+ public SearchDefinition < TDocument > Equals < TField > (
154
+ Expression < Func < TDocument , IEnumerable < TField > > > path ,
155
+ TField value ,
156
+ SearchScoreDefinition < TDocument > score = null ) =>
157
+ new EqualsSearchDefinition < TDocument , TField > (
158
+ new ExpressionFieldDefinition < TDocument , IEnumerable < TField > > ( path ) , value , score ) ;
144
159
145
160
/// <summary>
146
161
/// Creates a search definition that tests if a path to a specified indexed field name
@@ -574,7 +589,7 @@ public SearchDefinition<TDocument> QueryString<TField>(
574
589
/// <param name="path">The indexed field or fields to search.</param>
575
590
/// <param name="range">The field range.</param>
576
591
/// <param name="score">The score modifier.</param>
577
- /// <returns>A a range search definition.</returns>
592
+ /// <returns>A range search definition.</returns>
578
593
public SearchDefinition < TDocument > Range < TField > (
579
594
Expression < Func < TDocument , TField > > path ,
580
595
SearchRange < TField > range ,
@@ -589,7 +604,7 @@ public SearchDefinition<TDocument> Range<TField>(
589
604
/// <param name="path">The indexed field or fields to search.</param>
590
605
/// <param name="range">The field range.</param>
591
606
/// <param name="score">The score modifier.</param>
592
- /// <returns>A a range search definition.</returns>
607
+ /// <returns>A range search definition.</returns>
593
608
public SearchDefinition < TDocument > Range < TField > (
594
609
SearchPathDefinition < TDocument > path ,
595
610
SearchRange < TField > range ,
0 commit comments