@@ -1745,14 +1745,14 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
1745
1745
else if ( KnnDescriptorActions is not null )
1746
1746
{
1747
1747
writer . WritePropertyName ( "knn" ) ;
1748
- if ( KnnDescriptorActions . Length > 1 )
1748
+ if ( KnnDescriptorActions . Length != 1 )
1749
1749
writer . WriteStartArray ( ) ;
1750
1750
foreach ( var action in KnnDescriptorActions )
1751
1751
{
1752
1752
JsonSerializer . Serialize ( writer , new Elastic . Clients . Elasticsearch . Serverless . KnnQueryDescriptor < TDocument > ( action ) , options ) ;
1753
1753
}
1754
1754
1755
- if ( KnnDescriptorActions . Length > 1 )
1755
+ if ( KnnDescriptorActions . Length != 1 )
1756
1756
writer . WriteEndArray ( ) ;
1757
1757
}
1758
1758
else if ( KnnValue is not null )
@@ -1834,14 +1834,14 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
1834
1834
else if ( RescoreDescriptorActions is not null )
1835
1835
{
1836
1836
writer . WritePropertyName ( "rescore" ) ;
1837
- if ( RescoreDescriptorActions . Length > 1 )
1837
+ if ( RescoreDescriptorActions . Length != 1 )
1838
1838
writer . WriteStartArray ( ) ;
1839
1839
foreach ( var action in RescoreDescriptorActions )
1840
1840
{
1841
1841
JsonSerializer . Serialize ( writer , new Elastic . Clients . Elasticsearch . Serverless . Core . Search . RescoreDescriptor < TDocument > ( action ) , options ) ;
1842
1842
}
1843
1843
1844
- if ( RescoreDescriptorActions . Length > 1 )
1844
+ if ( RescoreDescriptorActions . Length != 1 )
1845
1845
writer . WriteEndArray ( ) ;
1846
1846
}
1847
1847
else if ( RescoreValue is not null )
@@ -1909,14 +1909,14 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
1909
1909
else if ( SortDescriptorActions is not null )
1910
1910
{
1911
1911
writer . WritePropertyName ( "sort" ) ;
1912
- if ( SortDescriptorActions . Length > 1 )
1912
+ if ( SortDescriptorActions . Length != 1 )
1913
1913
writer . WriteStartArray ( ) ;
1914
1914
foreach ( var action in SortDescriptorActions )
1915
1915
{
1916
1916
JsonSerializer . Serialize ( writer , new Elastic . Clients . Elasticsearch . Serverless . SortOptionsDescriptor < TDocument > ( action ) , options ) ;
1917
1917
}
1918
1918
1919
- if ( SortDescriptorActions . Length > 1 )
1919
+ if ( SortDescriptorActions . Length != 1 )
1920
1920
writer . WriteEndArray ( ) ;
1921
1921
}
1922
1922
else if ( SortValue is not null )
@@ -2791,14 +2791,14 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
2791
2791
else if ( KnnDescriptorActions is not null )
2792
2792
{
2793
2793
writer . WritePropertyName ( "knn" ) ;
2794
- if ( KnnDescriptorActions . Length > 1 )
2794
+ if ( KnnDescriptorActions . Length != 1 )
2795
2795
writer . WriteStartArray ( ) ;
2796
2796
foreach ( var action in KnnDescriptorActions )
2797
2797
{
2798
2798
JsonSerializer . Serialize ( writer , new Elastic . Clients . Elasticsearch . Serverless . KnnQueryDescriptor ( action ) , options ) ;
2799
2799
}
2800
2800
2801
- if ( KnnDescriptorActions . Length > 1 )
2801
+ if ( KnnDescriptorActions . Length != 1 )
2802
2802
writer . WriteEndArray ( ) ;
2803
2803
}
2804
2804
else if ( KnnValue is not null )
@@ -2880,14 +2880,14 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
2880
2880
else if ( RescoreDescriptorActions is not null )
2881
2881
{
2882
2882
writer . WritePropertyName ( "rescore" ) ;
2883
- if ( RescoreDescriptorActions . Length > 1 )
2883
+ if ( RescoreDescriptorActions . Length != 1 )
2884
2884
writer . WriteStartArray ( ) ;
2885
2885
foreach ( var action in RescoreDescriptorActions )
2886
2886
{
2887
2887
JsonSerializer . Serialize ( writer , new Elastic . Clients . Elasticsearch . Serverless . Core . Search . RescoreDescriptor ( action ) , options ) ;
2888
2888
}
2889
2889
2890
- if ( RescoreDescriptorActions . Length > 1 )
2890
+ if ( RescoreDescriptorActions . Length != 1 )
2891
2891
writer . WriteEndArray ( ) ;
2892
2892
}
2893
2893
else if ( RescoreValue is not null )
@@ -2955,14 +2955,14 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
2955
2955
else if ( SortDescriptorActions is not null )
2956
2956
{
2957
2957
writer . WritePropertyName ( "sort" ) ;
2958
- if ( SortDescriptorActions . Length > 1 )
2958
+ if ( SortDescriptorActions . Length != 1 )
2959
2959
writer . WriteStartArray ( ) ;
2960
2960
foreach ( var action in SortDescriptorActions )
2961
2961
{
2962
2962
JsonSerializer . Serialize ( writer , new Elastic . Clients . Elasticsearch . Serverless . SortOptionsDescriptor ( action ) , options ) ;
2963
2963
}
2964
2964
2965
- if ( SortDescriptorActions . Length > 1 )
2965
+ if ( SortDescriptorActions . Length != 1 )
2966
2966
writer . WriteEndArray ( ) ;
2967
2967
}
2968
2968
else if ( SortValue is not null )
0 commit comments