# Partial word highlighting doesn't work properly

**URL:** <https://discuss.elastic.co/t/partial-word-highlighting-doesnt-work-properly/205797>\
**Category:** Elasticsearch\
**Created:** [October 30, 2019, 6:45am UTC](https://discuss.elastic.co/t/partial-word-highlighting-doesnt-work-properly/205797 "2019-10-30T06:45:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ilamparithi\_Karthike](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ilamparithi_karthike/32/55156_2.png) [@Ilamparithi\_Karthike](https://discuss.elastic.co/u/Ilamparithi_Karthike)\
**Post date:** [October 30, 2019, 6:45am UTC](https://discuss.elastic.co/t/partial-word-highlighting-doesnt-work-properly/205797/1 "2019-10-30T06:45:13Z")

</div>

I am using highlighting(fvh) in the elasticsearch to highlight the keyword.  
When I do a search with keyword 5-2011, it produces the result with the keyword 005-2011 but it doesn't highlight the keyword.  
My query to highlight is

```auto
 {
                             "type": "fvh",
                             "pre_tags": ["<em>"],
                             "post_tags": ["</em>"],
                             "number_of_fragments": 100,
                             "fragment_size": 50,
                            "fields": { "*": {} }
}

```

**Elasticsearch version:** 7.4.0  
**Actual behavior:**  
it doesn't return highlight for the keyword(5-2011)

**expected behavior:**

> 00"\< em \>5-2011\</ em \>

**Settings for my index:** [https://pastebin.com/nxAbReBT](https://pastebin.com/nxAbReBT)

**Mappings:** [https://pastebin.com/cYTDnkrq](https://pastebin.com/cYTDnkrq)

**sample document:** ["\_index" : "c1s\_14\_oct\_2019", "\_type" : "\_doc", "\_id" - Pastebin.com](https://pastebin.com/NGa6PHTh)

**search query:** [{'size': 10, 'query': {'bool': {'must': [{'bool': {'should': [{'bool': {'should' - Pastebin.com](https://pastebin.com/gBp5wfE4)

**expected result:** ["\_index" : "c1s\_14\_oct\_2019", "\_type" : "\_doc", "\_id" : "vz - Pastebin.com](https://pastebin.com/4hBBhgN4)

**Github issue reference:** [[7.4.0, BUG] Highlighting(fvh) - Elastic Search · Issue #48054 · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/issues/48054)

---

<div class="post-metadata">

**Author:** ![Ilamparithi\_Karthike](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ilamparithi_karthike/32/55156_2.png) [@Ilamparithi\_Karthike](https://discuss.elastic.co/u/Ilamparithi_Karthike)\
**Post date:** [November 1, 2019, 7:14am UTC](https://discuss.elastic.co/t/partial-word-highlighting-doesnt-work-properly/205797/2 "2019-11-01T07:14:52Z")

</div>

@jimczi , any thoughts?

---

<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:** [November 29, 2019, 7:14am UTC](https://discuss.elastic.co/t/partial-word-highlighting-doesnt-work-properly/205797/3 "2019-11-29T07:14:55Z")

</div>

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