# Highlights whitch not begins with stopword

**URL:** <https://discuss.elastic.co/t/highlights-whitch-not-begins-with-stopword/99258>\
**Category:** Elasticsearch\
**Created:** [September 4, 2017, 8:08am UTC](https://discuss.elastic.co/t/highlights-whitch-not-begins-with-stopword/99258 "2017-09-04T08:08:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aslamy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aslamy/32/18254_2.png) [@aslamy](https://discuss.elastic.co/u/aslamy)\
**Post date:** [September 4, 2017, 8:08am UTC](https://discuss.elastic.co/t/highlights-whitch-not-begins-with-stopword/99258/1 "2017-09-04T08:08:35Z")

</div>

Hi !  
Highlighter generates fragments which begins with stopwords. How to make fragments which not begins with stopwords ?  
For instance I get now: " and the Caribbean during the spring and summer of 1806"  
but i want : "South Atlantic and the Caribbean during the spring and summer of 1806" .

---

<div class="post-metadata">

**Author:** ![jimczi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jimczi/32/47985_2.png) [@jimczi](https://discuss.elastic.co/u/jimczi)\
**Post date:** [September 4, 2017, 9:33am UTC](https://discuss.elastic.co/t/highlights-whitch-not-begins-with-stopword/99258/2 "2017-09-04T09:33:01Z")

</div>

Which highlighter are you using ? There is no rules that implies that a fragment should start with a stopword. The fragment creation is different on each highlighter, for instance the `fvh`, `unified` and `plain` highlighter uses `fragment_length` to split the input in fragments. You can try to use the `unified` highlighter and set `fragment_length` to a big integer in order to make sure that sentences are not splitted. The `unified` highlighter splits first on sentence boundary and then applies the `max_fragment_length` to each sentence.

---

<div class="post-metadata">

**Author:** ![aslamy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aslamy/32/18254_2.png) [@aslamy](https://discuss.elastic.co/u/aslamy)\
**Post date:** [September 4, 2017, 10:25am UTC](https://discuss.elastic.co/t/highlights-whitch-not-begins-with-stopword/99258/3 "2017-09-04T10:25:25Z")

</div>

Hi !  
I'm using fvh. The problem is that I want sentences to split but splitting should not occur on stopwords.

---

<div class="post-metadata">

**Author:** ![jimczi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jimczi/32/47985_2.png) [@jimczi](https://discuss.elastic.co/u/jimczi)\
**Post date:** [September 4, 2017, 2:57pm UTC](https://discuss.elastic.co/t/highlights-whitch-not-begins-with-stopword/99258/4 "2017-09-04T14:57:26Z")

</div>

Ok sorry for the misunderstanding. There is no option to achieve this in the highlighter currently. The only check that is done when splitting a sentence is that it does not cross a word boundary.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 2, 2017, 2:57pm UTC](https://discuss.elastic.co/t/highlights-whitch-not-begins-with-stopword/99258/5 "2017-10-02T14:57:30Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
