@@ -18,7 +18,9 @@ public class Field : IEquatable<Field>, IUrlParameter
1818 private readonly object _comparisonValue ;
1919 private readonly Type _type ;
2020
21- public Field ( string name , double ? boost = null , string format = null )
21+ public Field ( string name , double ? boost = null ) : this ( name , boost , format : null ) { }
22+
23+ public Field ( string name , double ? boost , string format = null )
2224 {
2325 name . ThrowIfNullOrEmpty ( nameof ( name ) ) ;
2426 Name = ParseFieldName ( name , out var b ) ;
@@ -27,7 +29,9 @@ public Field(string name, double? boost = null, string format = null)
2729 _comparisonValue = Name ;
2830 }
2931
30- public Field ( Expression expression , double ? boost = null , string format = null )
32+ public Field ( Expression expression , double ? boost = null ) : this ( expression , boost , format : null ) { }
33+
34+ public Field ( Expression expression , double ? boost , string format = null )
3135 {
3236 Expression = expression ?? throw new ArgumentNullException ( nameof ( expression ) ) ;
3337 Boost = boost ;
@@ -37,7 +41,9 @@ public Field(Expression expression, double? boost = null, string format = null)
3741 CachableExpression = ! new HasVariableExpressionVisitor ( expression ) . Found ;
3842 }
3943
40- public Field ( PropertyInfo property , double ? boost = null , string format = null )
44+ public Field ( PropertyInfo property , double ? boost = null ) : this ( property , boost , format : null ) { }
45+
46+ public Field ( PropertyInfo property , double ? boost , string format = null )
4147 {
4248 Property = property ?? throw new ArgumentNullException ( nameof ( property ) ) ;
4349 Boost = boost ;
@@ -98,13 +104,21 @@ string IUrlParameter.GetString(IConnectionConfigurationValues settings)
98104
99105 public Fields And ( Field field ) => new Fields ( new [ ] { this , field } ) ;
100106
101- public Fields And < T > ( Expression < Func < T , object > > field , double ? boost = null , string format = null ) where T : class =>
107+ public Fields And < T > ( Expression < Func < T , object > > field , double ? boost = null ) where T : class =>
108+ new Fields ( new [ ] { this , new Field ( field , boost , format : null ) } ) ;
109+
110+ public Fields And < T > ( Expression < Func < T , object > > field , double ? boost , string format = null ) where T : class =>
102111 new Fields ( new [ ] { this , new Field ( field , boost , format ) } ) ;
103112
104- public Fields And ( string field , double ? boost = null , string format = null ) =>
113+ public Fields And ( string field , double ? boost = null ) => new Fields ( new [ ] { this , new Field ( field , boost , format : null ) } ) ;
114+
115+ public Fields And ( string field , double ? boost , string format = null ) =>
105116 new Fields ( new [ ] { this , new Field ( field , boost , format ) } ) ;
106117
107- public Fields And ( PropertyInfo property , double ? boost = null , string format = null ) =>
118+ public Fields And ( PropertyInfo property , double ? boost = null ) =>
119+ new Fields ( new [ ] { this , new Field ( property , boost , format : null ) } ) ;
120+
121+ public Fields And ( PropertyInfo property , double ? boost , string format = null ) =>
108122 new Fields ( new [ ] { this , new Field ( property , boost , format ) } ) ;
109123
110124 private static string ParseFieldName ( string name , out double ? boost )
0 commit comments