Skip to content

Commit

Permalink
Added test for highlighting max_analyzer_offset request parameter wit…
Browse files Browse the repository at this point in the history
…h plain highlighter.

Signed-off-by: Thomas Seidl <remus@gmx.net>
  • Loading branch information
drunken-monkey committed Oct 25, 2023
1 parent b5299f1 commit 8eb91ee
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,15 @@ setup:
index: test1
body: {"query" : {"match" : {"field2" : "fox"}}, "highlight" : {"type" : "plain", "fields" : {"field2" : {}}}}
- match: { error.root_cause.0.type: "illegal_argument_exception" }

---
"Plain highlighter on a field WITHOUT OFFSETS using max_analyzer_offset should SUCCEED":
- skip:
version: " - 2.1.99"
reason: only starting supporting the parameter max_analyzer_offset on version 2.2
- do:
search:
rest_total_hits_as_int: true
index: test1
body: {"query" : {"match" : {"field1" : "quick"}}, "highlight" : {"type" : "plain", "fields" : {"field1" : {"max_analyzer_offset": 10}}}}
- match: {hits.hits.0.highlight.field1.0: "The <em>quick</em> brown fox went to the forest and saw another fox."}

0 comments on commit 8eb91ee

Please sign in to comment.