# Fast vector highlighting boundaries does not work properly

**URL:** <https://discuss.elastic.co/t/fast-vector-highlighting-boundaries-does-not-work-properly/23982>\
**Category:** Elasticsearch\
**Created:** [June 19, 2015, 12:20pm UTC](https://discuss.elastic.co/t/fast-vector-highlighting-boundaries-does-not-work-properly/23982 "2015-06-19T12:20:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![iulianlaz](https://avatars.discourse-cdn.com/v4/letter/i/e95f7d/32.png) [@iulianlaz](https://discuss.elastic.co/u/iulianlaz)\
**Post date:** [June 19, 2015, 12:20pm UTC](https://discuss.elastic.co/t/fast-vector-highlighting-boundaries-does-not-work-properly/23982/1 "2015-06-19T12:20:13Z")

</div>

Hello,

I want to highlight the entire URL if a word from URL has a match. For that, I use fast vector highlighting.  
When I try to use [fast vector highlighting](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-highlighting.html#fast-vector-highlighter), a problem occurs when I set [boundary\_chars](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-highlighting.html#boundary-characters).

My _boundry\_chars_ attribute is set to " " (whitespace), but it seems it does not work. "." character seems to be a boundary too.

Example:

```
STEP 1: Create a new index: PUT conversation_new

STEP 2: Add the following mapping: POST conversation_new/message/_mapping
{"message":{"properties":{"body":{"type":"string","index":"no","fields":{"contains":{"type":"string","index_analyzer":"index_fulltext_analyzer","search_analyzer":"search_fulltext_analyzer","term_vector":"with_positions_offsets"}}}}}}

STEP 3: Add a document: POST conversation_new/message/
{"body":"Iulian Test First 9.test.9.23.user from lorem_ipsum_test PowerShot http://192.168.9.236.4grid.eu/person/at/9.23.user/"}

STEP 4: Execute highlight query: POST conversation_new/message/_search
{"query":{"filtered":{"query":[{"bool":{"should":[{"match":{"body.contains":"9.23.user"}}]}}]}},"fields":["_parent","_source"],"size":20,"highlight":{"fields":{"body.contains":{"number_of_fragments":0,"type":"fvh","boundary_chars":" ","boundary_max_scan":100}}}}

```

The response from STEP 4 will be:

```
"hits": {
  "total": 1,
  "max_score": 0.07527358,
  "hits": [
     {
        "_index": "conversation_new",
        "_type": "message",
        "_id": "AU4LqXYP_8lKZ4oIJkkZ",
        "_score": 0.07527358,
        "_source": {
           "body": "Iulian Test First 9.test.9.23.user from blabla_test PowerShot http://192.168.9.236.4grid.eu/person/at/9.23.user/"
        },
        "highlight": {
           "body.contains": [
              "Iulian Test First <em>9</em>.test.<em>9</em>.<em>23</em>.<em>user</em> from blabla_test PowerShot http://192.168.<em>9</em>.236.4grid.eu/person/at/<em>9</em>.<em>23</em>.<em>user</em>/"
           ]
        }
     }
  ]

```

}

I expect something like:

```
"body.contains": [
              "Iulian Test First <em>9test.9.23.user</em> from blabla_test PowerShot <em>http://192.168.9.236.4grid.eu/person/at/9.23.user</em>/"

```

Actually, I want to highlight the entire URL if a word from URL has a match.

Is this a bug?

Thanks a lot,  
Iulian

---

<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:** [July 6, 2017, 12:06am UTC](https://discuss.elastic.co/t/fast-vector-highlighting-boundaries-does-not-work-properly/23982/2 "2017-07-06T00:06:27Z")

</div>


