Skip to content

Commit eb6725e

Browse files
Added test for zero
1 parent 1285b01 commit eb6725e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.highlight/30_max_analyzed_offset.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,20 @@ setup:
114114
body: {"query" : {"match" : {"field2" : "fox"}}, "highlight" : {"type" : "plain", "fields" : {"field2" : {}}, "max_analyzed_offset": 20}}
115115
- match: {hits.hits.0.highlight.field2.0: "The quick brown <em>fox</em> went to the forest and saw another fox."}
116116

117+
---
118+
"Plain highlighter on a field WITH OFFSETS exceeding index.highlight.max_analyzed_offset with max_analyzed_offset=0 should SUCCEED":
119+
120+
- requires:
121+
cluster_features: ["gte_v7.12.0"]
122+
reason: max_analyzed_offset query param added in 7.12.0
123+
124+
- do:
125+
search:
126+
rest_total_hits_as_int: true
127+
index: test1
128+
body: {"query" : {"match" : {"field2" : "fox"}}, "highlight" : {"type" : "plain", "fields" : {"field2" : {}}, "max_analyzed_offset": 0}}
129+
- match: { hits.hits.0.highlight: null }
130+
117131
---
118132
"Plain highlighter on a field WITH OFFSETS exceeding index.highlight.max_analyzed_offset with max_analyzed_offset=1 should SUCCEED":
119133

0 commit comments

Comments
 (0)