Доброго время суток!
Делаю подсветку строк с такими параметрами:
'highlight' => array(
'pre_tags' => array('<int>'),
'post_tags' => array('</ins>'),
'fields' => array(
text' => array('type' => 'fvh'),
)
)
Она хорошо работает, но когда делаю подсветку длинной строки - тогда мне возвращаються фрагменты строки, которые подсвечены. Пример ответа от Еластика:
[_source] => Array
(
[id] => 3206829
[text] => Coming to life as a chunk of stone, Tiny's origins are a mystery on which he continually speculates. He is a Stone Giant now, but what did he used to be? A splinter broken from a Golem's heel? A shard swept from a gargoyle-sculptor's workshop? A fragment of the Oracular Visage of Garthos? A deep curiosity drives him, and he travels the world tirelessly seeking his origins, his parentage, his people. As he roams, he gathers weight and size; the forces that weather lesser rocks, instead cause Tiny to grow and ever grow.
)
[highlight] => Array
(
[text] => Array
(
[0] => <ins>Coming</ins> to life as a chunk of stone, Tiny's origins are a mystery on which he continually speculates.
[1] => Stone Giant now, but what did he used to be? A <ins>splinter</ins> broken from a Golem's heel? A shard swept from
[2] => workshop? A fragment of the <ins>Oracular Visage of Garthos</ins>? A <ins>deep</ins> <ins>curiosity</ins> <ins>drives</ins> him, and he travels the world
[3] => tirelessly seeking his origins, his parentage, his <ins>people</ins>. As he roams, he gathers weight and size; the forces
)
)
)
Хотелось бы получить всю подсветку в одной строке. Сейчас чтоб получить всю строку надо делать постпроцесинг, заменяя части строк оригинальной строки на "подсветку". Можно ли както указать Еластику возвращать сразу всю подсвечену строку, а не фрагментЬІ подсветок?