[highlighting] Another test for boundary chars
This commit is contained in:
parent
f5898fb07f
commit
add60a7560
|
@ -851,6 +851,15 @@ public class HighlighterSearchIT extends ESIntegTestCase {
|
|||
|
||||
assertHighlight(searchResponse, 0, "field2", 0, 1, equalTo("The <em>quick</em> brown fox jumps over"));
|
||||
|
||||
logger.info("--> searching with boundary characters on the field");
|
||||
source = searchSource()
|
||||
.query(matchQuery("field2", "quick"))
|
||||
.highlighter(highlight().field(new Field("field2").fragmentSize(30).numOfFragments(1).boundaryChars(new char[] {' '})));
|
||||
|
||||
searchResponse = client().prepareSearch("test").setSource(source).get();
|
||||
|
||||
assertHighlight(searchResponse, 0, "field2", 0, 1, equalTo("The <em>quick</em> brown fox jumps over"));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue