File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ private static ConnectionSettings DefaultSettings(ConnectionSettings settings) =
6767 . DefaultIndex ( "default-index" )
6868 . PrettyJson ( )
6969 . InferMappingFor < Project > ( ProjectMapping )
70+ . InferMappingFor < Ranges > ( RangesMapping )
7071 . InferMappingFor < CommitActivity > ( map => map
7172 . IndexName ( "project" )
7273 . TypeName ( "commits" )
@@ -104,6 +105,15 @@ private static IClrTypeMapping<Project> ProjectMapping(ClrTypeMappingDescriptor<
104105 m . Ignore ( p => p . Ranges ) ;
105106 return m ;
106107 }
108+
109+ private static IClrTypeMapping < Ranges > RangesMapping ( ClrTypeMappingDescriptor < Ranges > m )
110+ {
111+ //ip_range type only available since 5.5.0 so we ignore them when running integration tests
112+ if ( VersionUnderTestSatisfiedBy ( "<5.5.0" ) && Configuration . RunIntegrationTests )
113+ m . Ignore ( p => p . Ips ) ;
114+ return m ;
115+ }
116+
107117 public static string PercolatorType => Configuration . ElasticsearchVersion <= ElasticsearchVersion . GetOrAdd ( "5.0.0-alpha1" )
108118 ? ".percolator"
109119 : "query" ;
You can’t perform that action at this time.
0 commit comments