@@ -111,7 +111,7 @@ public SearchDefinition<TDocument> EmbeddedDocument<TField>(
111111 /// <summary>
112112 /// Creates a search definition that queries for documents where an indexed field is equal
113113 /// 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 .
115115 /// </summary>
116116 /// <typeparam name="TField">The type of the field.</typeparam>
117117 /// <param name="path">The indexed field to search.</param>
@@ -121,14 +121,13 @@ public SearchDefinition<TDocument> EmbeddedDocument<TField>(
121121 public SearchDefinition < TDocument > Equals < TField > (
122122 FieldDefinition < TDocument , TField > path ,
123123 TField value ,
124- SearchScoreDefinition < TDocument > score = null )
125- where TField : struct , IComparable < TField > =>
124+ SearchScoreDefinition < TDocument > score = null ) =>
126125 new EqualsSearchDefinition < TDocument , TField > ( path , value , score ) ;
127126
128127 /// <summary>
129128 /// Creates a search definition that queries for documents where an indexed field is equal
130129 /// 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 .
132131 /// </summary>
133132 /// <typeparam name="TField">The type of the field.</typeparam>
134133 /// <param name="path">The indexed field to search.</param>
@@ -138,9 +137,25 @@ public SearchDefinition<TDocument> Equals<TField>(
138137 public SearchDefinition < TDocument > Equals < TField > (
139138 Expression < Func < TDocument , TField > > path ,
140139 TField value ,
141- SearchScoreDefinition < TDocument > score = null )
142- where TField : struct , IComparable < TField > =>
140+ SearchScoreDefinition < TDocument > score = null ) =>
143141 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 ) ;
144159
145160 /// <summary>
146161 /// Creates a search definition that tests if a path to a specified indexed field name
@@ -574,7 +589,7 @@ public SearchDefinition<TDocument> QueryString<TField>(
574589 /// <param name="path">The indexed field or fields to search.</param>
575590 /// <param name="range">The field range.</param>
576591 /// <param name="score">The score modifier.</param>
577- /// <returns>A a range search definition.</returns>
592+ /// <returns>A range search definition.</returns>
578593 public SearchDefinition < TDocument > Range < TField > (
579594 Expression < Func < TDocument , TField > > path ,
580595 SearchRange < TField > range ,
@@ -589,7 +604,7 @@ public SearchDefinition<TDocument> Range<TField>(
589604 /// <param name="path">The indexed field or fields to search.</param>
590605 /// <param name="range">The field range.</param>
591606 /// <param name="score">The score modifier.</param>
592- /// <returns>A a range search definition.</returns>
607+ /// <returns>A range search definition.</returns>
593608 public SearchDefinition < TDocument > Range < TField > (
594609 SearchPathDefinition < TDocument > path ,
595610 SearchRange < TField > range ,
0 commit comments