@@ -19,7 +19,7 @@ public interface IStringProperty : IProperty
1919 string NullValue { get ; set ; }
2020
2121 [ JsonProperty ( "norms" ) ]
22- NormsMapping Norms { get ; set ; }
22+ INorms Norms { get ; set ; }
2323
2424 [ JsonProperty ( "index_options" ) ]
2525 IndexOptions ? IndexOptions { get ; set ; }
@@ -51,7 +51,7 @@ public StringProperty() : base("string") { }
5151 public TermVectorOption ? TermVector { get ; set ; }
5252 public double ? Boost { get ; set ; }
5353 public string NullValue { get ; set ; }
54- public NormsMapping Norms { get ; set ; }
54+ public INorms Norms { get ; set ; }
5555 public IndexOptions ? IndexOptions { get ; set ; }
5656 public string Analyzer { get ; set ; }
5757 public string SearchAnalyzer { get ; set ; }
@@ -69,7 +69,7 @@ public class StringPropertyDescriptor<T>
6969 TermVectorOption ? IStringProperty . TermVector { get ; set ; }
7070 double ? IStringProperty . Boost { get ; set ; }
7171 string IStringProperty . NullValue { get ; set ; }
72- NormsMapping IStringProperty . Norms { get ; set ; }
72+ INorms IStringProperty . Norms { get ; set ; }
7373 IndexOptions ? IStringProperty . IndexOptions { get ; set ; }
7474 string IStringProperty . Analyzer { get ; set ; }
7575 string IStringProperty . SearchAnalyzer { get ; set ; }
@@ -99,7 +99,7 @@ public StringPropertyDescriptor() : base("string") { }
9999
100100 public StringPropertyDescriptor < T > SearchAnalyzer ( string searchAnalyzer ) => Assign ( a => a . SearchAnalyzer = searchAnalyzer ) ;
101101
102- public StringPropertyDescriptor < T > Norms ( NormsMapping normsMapping ) => Assign ( a => a . Norms = normsMapping ) ;
102+ public StringPropertyDescriptor < T > Norms ( Func < NormsDescriptor , INorms > selector ) => Assign ( a => a . Norms = selector ? . Invoke ( new NormsDescriptor ( ) ) ) ;
103103
104104 public StringPropertyDescriptor < T > IgnoreAbove ( int ignoreAbove ) => Assign ( a => a . IgnoreAbove = ignoreAbove ) ;
105105
@@ -108,6 +108,6 @@ public StringPropertyDescriptor() : base("string") { }
108108 public StringPropertyDescriptor < T > PositionOffsetGap ( int positionOffsetGap ) => Assign ( a => a . PositionOffsetGap = positionOffsetGap ) ;
109109
110110 public StringPropertyDescriptor < T > Fielddata ( Func < StringFielddataDescriptor , IStringFielddata > selector ) =>
111- Assign ( a => selector ( new StringFielddataDescriptor ( ) ) ) ;
111+ Assign ( a => a . Fielddata = selector ? . Invoke ( new StringFielddataDescriptor ( ) ) ) ;
112112 }
113113}
0 commit comments