File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed
Nest/Document/Single/TermVectors
Multiple/MultiTermVectors Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ public class TermVectorTerm
1212 [ JsonProperty ( "term_freq" ) ]
1313 public int TermFrequency { get ; internal set ; }
1414
15+ [ JsonProperty ( "score" ) ]
16+ public double Score { get ; internal set ; }
17+
1518 [ JsonProperty ( "tokens" ) ]
1619 public IReadOnlyCollection < Token > Tokens { get ; internal set ; } =
1720 EmptyReadOnly < Token > . Collection ;
Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ private static void AssertTermVectors(TermVector vectors)
121121 vectorTerm . Value . DocumentFrequency . Should ( ) . BeGreaterThan ( 0 ) ;
122122 vectorTerm . Value . TotalTermFrequency . Should ( ) . BeGreaterThan ( 0 ) ;
123123 vectorTerm . Value . Tokens . Should ( ) . NotBeEmpty ( ) ;
124+ vectorTerm . Value . Score . Should ( ) . BeGreaterThan ( 0 ) ;
124125
125126 var token = vectorTerm . Value . Tokens . First ( ) ;
126127 token . EndOffset . Should ( ) . BeGreaterThan ( 0 ) ;
@@ -206,6 +207,7 @@ private static void AssertTermVectors(TermVector vectors)
206207 vectorTerm . Value . TermFrequency . Should ( ) . BeGreaterThan ( 0 ) ;
207208 vectorTerm . Value . TotalTermFrequency . Should ( ) . BeGreaterThan ( 0 ) ;
208209 vectorTerm . Value . Tokens . Should ( ) . NotBeEmpty ( ) ;
210+ vectorTerm . Value . Score . Should ( ) . BeGreaterThan ( 0 ) ;
209211
210212 var token = vectorTerm . Value . Tokens . First ( ) ;
211213 token . EndOffset . Should ( ) . BeGreaterThan ( 0 ) ;
Original file line number Diff line number Diff line change 11using System ;
2+ using System . Linq ;
23using Elasticsearch . Net ;
34using FluentAssertions ;
45using Nest ;
@@ -111,6 +112,7 @@ private static void AssertTermVector(TermVector termvector)
111112 termvector . FieldStatistics . SumOfDocumentFrequencies . Should ( ) . BeGreaterThan ( 0 ) ;
112113 termvector . FieldStatistics . SumOfTotalTermFrequencies . Should ( ) . BeGreaterThan ( 0 ) ;
113114 termvector . Terms . Should ( ) . NotBeNull ( ) ;
115+ termvector . Terms . First ( ) . Value . Score . Should ( ) . BeGreaterThan ( 0 ) ;
114116 }
115117 }
116118}
You can’t perform that action at this time.
0 commit comments