File tree Expand file tree Collapse file tree 5 files changed +11
-9
lines changed
Foundatio.Lucene.EntityFramework
Foundatio.Lucene.Elasticsearch.Tests Expand file tree Collapse file tree 5 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 44 <ProjectReference Include =" ..\Foundatio.Lucene\Foundatio.Lucene.csproj" />
55 </ItemGroup >
66
7- <ItemGroup >
7+ <ItemGroup Condition = " '$(TargetFramework)' == 'net8.0' " >
88 <PackageReference Include =" Microsoft.EntityFrameworkCore" Version =" 9.0.0" />
99 </ItemGroup >
1010
11+ <ItemGroup Condition =" '$(TargetFramework)' == 'net10.0'" >
12+ <PackageReference Include =" Microsoft.EntityFrameworkCore" Version =" 10.0.1" />
13+ </ItemGroup >
14+
1115</Project >
Original file line number Diff line number Diff line change @@ -203,7 +203,7 @@ private void AppendTerm(TermNode node)
203203 if ( node . FuzzyDistance . HasValue )
204204 {
205205 _builder . Append ( '~' ) ;
206- if ( node . FuzzyDistance . Value != TermNode . DefaultFuzzyDistanceValue )
206+ if ( node . FuzzyDistance . Value != TermNode . DefaultFuzzyDistance )
207207 {
208208 _builder . Append ( node . FuzzyDistance . Value ) ;
209209 }
@@ -312,7 +312,7 @@ private void AppendMultiTerm(MultiTermNode node)
312312 if ( node . FuzzyDistance . HasValue )
313313 {
314314 _builder . Append ( '~' ) ;
315- if ( node . FuzzyDistance . Value != TermNode . DefaultFuzzyDistanceValue )
315+ if ( node . FuzzyDistance . Value != TermNode . DefaultFuzzyDistance )
316316 {
317317 _builder . Append ( node . FuzzyDistance . Value ) ;
318318 }
Original file line number Diff line number Diff line change @@ -24,8 +24,7 @@ public ElasticsearchFixture()
2424 // Use Elasticsearch 9.x which is required for the Elastic.Clients.Elasticsearch 9.x client
2525 // The 9.x client sends version 9 headers that ES 8.x rejects
2626 // Use generic container builder for ES 9.x since Testcontainers.Elasticsearch doesn't support it yet
27- _container = new ContainerBuilder ( )
28- . WithImage ( "docker.elastic.co/elasticsearch/elasticsearch:9.0.0" )
27+ _container = new ContainerBuilder ( "docker.elastic.co/elasticsearch/elasticsearch:9.0.0" )
2928 . WithPortBinding ( ElasticsearchPort , true )
3029 . WithEnvironment ( "discovery.type" , "single-node" )
3130 . WithEnvironment ( "ELASTIC_PASSWORD" , Password )
Original file line number Diff line number Diff line change @@ -134,8 +134,7 @@ public async Task CanParseFuzzyQuery()
134134
135135 Assert . NotNull ( query ) ;
136136 Assert . NotNull ( query . QueryString ) ;
137- // Default fuzzy distance is 2
138- Assert . Equal ( "test~2" , query . QueryString . Query ) ;
137+ Assert . Equal ( "test~" , query . QueryString . Query ) ;
139138 }
140139
141140 [ Fact ]
Original file line number Diff line number Diff line change @@ -93,14 +93,14 @@ public void ToQueryString_ExclusiveRange_ReturnsBraces()
9393 }
9494
9595 [ Fact ]
96- public void ToQueryString_FuzzyTerm_ReturnsTilde ( )
96+ public void ToQueryString_FuzzyTermWithExplicitDefaultValue_ReturnsExplicitValue ( )
9797 {
9898 var result = LuceneQuery . Parse ( "roam~2" ) ;
9999 var builder = new QueryStringBuilder ( ) ;
100100
101101 var output = builder . Visit ( result . Document ) ;
102102
103- Assert . Equal ( "roam~" , output ) ;
103+ Assert . Equal ( "roam~2 " , output ) ;
104104 }
105105
106106 [ Fact ]
You can’t perform that action at this time.
0 commit comments