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) =
67
67
. DefaultIndex ( "default-index" )
68
68
. PrettyJson ( )
69
69
. InferMappingFor < Project > ( ProjectMapping )
70
+ . InferMappingFor < Ranges > ( RangesMapping )
70
71
. InferMappingFor < CommitActivity > ( map => map
71
72
. IndexName ( "project" )
72
73
. TypeName ( "commits" )
@@ -104,6 +105,15 @@ private static IClrTypeMapping<Project> ProjectMapping(ClrTypeMappingDescriptor<
104
105
m . Ignore ( p => p . Ranges ) ;
105
106
return m ;
106
107
}
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
+
107
117
public static string PercolatorType => Configuration . ElasticsearchVersion <= ElasticsearchVersion . GetOrAdd ( "5.0.0-alpha1" )
108
118
? ".percolator"
109
119
: "query" ;
You can’t perform that action at this time.
0 commit comments