-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Description
I have:
Elasticsearch 6.1.2
Mapping:
PUT my_index
{
"mappings":{
"my_type":{
"properties":{
"title":{
"term_vector":"with_positions_offsets",
"type":"text"
}
}
}
}
}
PUT my_index/my_type/1
{
"title":"Hello. This is a test."
}
Search:
{
"query":{
"match":{
"title":"Hello"
}
},
"highlight":{
"fields":{
"title":{
"fragment_size":1000,
"number_of_fragments":1,
"type": "unified"
}
}
}
}
Result:
{
"took":0,
"timed_out":false,
"_shards":{
"total":5,
"successful":5,
"skipped":0,
"failed":0
},
"hits":{
"total":1,
"max_score":0.2876821,
"hits":[
{
"_index":"my_index",
"_type":"my_type",
"_id":"1",
"_score":0.2876821,
"_source":{
"title":"Hello. This is a test."
},
"highlight":{
"title":[
"<em>Hello</em>."
]
}
}
]
}
}
Problem:
It seems that unified highlighter does not care about fragment size. When fragment_size is 1000 it should not split but it does split on first point (dot). I know if fragment_size = 0 then it not split, but that's not what I want.
I have fields with many sentence I want to split around 256 characters, but highlighter splitting always on first point hit.
Metadata
Metadata
Assignees
Labels
No labels