File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Tests/Nest.Tests.Unit/Search/Highlight Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ public class HighlightFieldDescriptor<T> where T : class
2121 [ JsonProperty ( "fragment_size" ) ]
2222 internal int ? _FragmentSize { get ; set ; }
2323
24+ [ JsonProperty ( "no_match_size" ) ]
25+ internal int ? _NoMatchSize { get ; set ; }
26+
2427 [ JsonProperty ( "number_of_fragments" ) ]
2528 internal int ? _NumberOfFragments { get ; set ; }
2629
@@ -105,6 +108,11 @@ public HighlightFieldDescriptor<T> FragmentSize(int fragmentSize)
105108 this . _FragmentSize = fragmentSize ;
106109 return this ;
107110 }
111+ public HighlightFieldDescriptor < T > NoMatchSize ( int noMatchSize )
112+ {
113+ this . _NoMatchSize = noMatchSize ;
114+ return this ;
115+ }
108116 public HighlightFieldDescriptor < T > NumberOfFragments ( int numberOfFragments )
109117 {
110118 this . _NumberOfFragments = numberOfFragments ;
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ public void TestHighlight()
2626 . OnFields (
2727 f => f
2828 . OnAll ( )
29+ . NoMatchSize ( 200 )
2930 . PreTags ( "<em>" )
3031 . PostTags ( "</em>" )
3132 )
@@ -46,7 +47,8 @@ public void TestHighlight()
4647 fields: {
4748 _all: {
4849 pre_tags: [""<em>""],
49- post_tags: [""</em>""]
50+ post_tags: [""</em>""],
51+ no_match_size: 200
5052 }
5153 },
5254 require_field_match: true,
You can’t perform that action at this time.
0 commit comments