@@ -79,6 +79,13 @@ public interface IHighlight
79
79
[ DataMember ( Name = "highlight_query" ) ]
80
80
QueryContainer HighlightQuery { get ; set ; }
81
81
82
+ /// <summary>
83
+ /// If this setting is set to a non-negative value, the highlighting stops at this defined maximum limit, and the
84
+ /// rest of the text is not processed, thus not highlighted and no error is returned.
85
+ /// </summary>
86
+ [ DataMember ( Name = "max_analyzed_offset" ) ]
87
+ int ? MaxAnalyzedOffset { get ; set ; }
88
+
82
89
[ DataMember ( Name = "max_fragment_length" ) ]
83
90
int ? MaxFragmentLength { get ; set ; }
84
91
@@ -178,6 +185,9 @@ public class Highlight : IHighlight
178
185
/// <inheritdoc/>
179
186
public QueryContainer HighlightQuery { get ; set ; }
180
187
188
+ /// <inheritdoc/>
189
+ public int ? MaxAnalyzedOffset { get ; set ; }
190
+
181
191
/// <inheritdoc/>
182
192
public int ? MaxFragmentLength { get ; set ; }
183
193
@@ -224,6 +234,7 @@ public class HighlightDescriptor<T> : DescriptorBase<HighlightDescriptor<T>, IHi
224
234
int ? IHighlight . FragmentOffset { get ; set ; }
225
235
int ? IHighlight . FragmentSize { get ; set ; }
226
236
QueryContainer IHighlight . HighlightQuery { get ; set ; }
237
+ int ? IHighlight . MaxAnalyzedOffset { get ; set ; }
227
238
int ? IHighlight . MaxFragmentLength { get ; set ; }
228
239
int ? IHighlight . NoMatchSize { get ; set ; }
229
240
int ? IHighlight . NumberOfFragments { get ; set ; }
@@ -288,6 +299,9 @@ public HighlightDescriptor<T> HighlightQuery(Func<QueryContainerDescriptor<T>, Q
288
299
/// <inheritdoc cref="IHighlight.BoundaryMaxScan" />
289
300
public HighlightDescriptor < T > BoundaryMaxScan ( int ? boundaryMaxScan ) => Assign ( boundaryMaxScan , ( a , v ) => a . BoundaryMaxScan = v ) ;
290
301
302
+ /// <inheritdoc cref="IHighlight.MaxAnalyzedOffset" />
303
+ public HighlightDescriptor < T > MaxAnalyzedOffset ( int ? maxAnalyzedOffset ) => Assign ( maxAnalyzedOffset , ( a , v ) => a . MaxAnalyzedOffset = v ) ;
304
+
291
305
/// <inheritdoc cref="IHighlight.MaxFragmentLength" />
292
306
public HighlightDescriptor < T > MaxFragmentLength ( int ? maxFragmentLength ) => Assign ( maxFragmentLength , ( a , v ) => a . MaxFragmentLength = v ) ;
293
307
0 commit comments