# Fvh Highlighting taking longer time than unified highlighting

**URL:** <https://discuss.elastic.co/t/fvh-highlighting-taking-longer-time-than-unified-highlighting/157643>\
**Category:** Elasticsearch\
**Created:** [November 21, 2018, 7:55am UTC](https://discuss.elastic.co/t/fvh-highlighting-taking-longer-time-than-unified-highlighting/157643 "2018-11-21T07:55:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikesh/32/86579_2.png) [@Nikesh](https://discuss.elastic.co/u/Nikesh)\
**Post date:** [November 21, 2018, 7:55am UTC](https://discuss.elastic.co/t/fvh-highlighting-taking-longer-time-than-unified-highlighting/157643/1 "2018-11-21T07:55:24Z")

</div>

Hi all,  
I am trying out different methods of highlighting. As i can see "fvh" is taking more than 10 times as of unified.  
The query is :

```
{"from" : 0, "size" : 1,"_source": {"includes":["TITLE"]
}, "query": {
    "bool": {"should": [{
          "query_string": {
            "query":"\"pratik\"",
            "fields":[],
            "boost":"50"
					}
			}, {
          "multi_match": {
            "query":"pratik",
            "type":"phrase",
            "boost":"10",
            "slop":"2",
            "fields":[]
}},{
        	
          "multi_match": {
           "query":"pratik",
    			     "fields":[]
}},{
        	
          "multi_match": {
           "query":"pratik",
           "fuzziness":"AUTO",
    			     "fields":[]
}}],"minimum_should_match":1,"filter": [{ "terms": { "ID.keyword" : ["a12d"]} } ]}}, "highlight": {
        "type" : "fvh",
        "fields": {
            "*": {}
        }
    }} 

```

fvh takes around 140938ms and unified takes 1283ms. How do I reduce the time taken by fvh? Is unified being deprecated ?

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [November 21, 2018, 9:30am UTC](https://discuss.elastic.co/t/fvh-highlighting-taking-longer-time-than-unified-highlighting/157643/2 "2018-11-21T09:30:39Z")

</div>

FastVectorHighlighter isn't always fast in my experience.  
The reason we have different highlighters reflects the fact that various people in the Lucene community have tackled this problem in various ways over the years - each with varying degrees of success.

> Is unified being deprecated ?

No. It's currently our default highlighter

---

<div class="post-metadata">

**Author:** ![Nikesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikesh/32/86579_2.png) [@Nikesh](https://discuss.elastic.co/u/Nikesh)\
**Post date:** [November 21, 2018, 10:09am UTC](https://discuss.elastic.co/t/fvh-highlighting-taking-longer-time-than-unified-highlighting/157643/3 "2018-11-21T10:09:29Z")

</div>

Thanks for the response. Really appreciate it.  
Add on to my earlier doubt, Unified method highlights both keyword and text field( i have indexed each field as text and keyword) while fvh only highlights text fields.  
Is there a method where I could avoid duplicity in highlighting while using unified highlighter?

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [November 21, 2018, 10:13am UTC](https://discuss.elastic.co/t/fvh-highlighting-taking-longer-time-than-unified-highlighting/157643/4 "2018-11-21T10:13:32Z")

</div>

Generally speaking if you explicitly list only a few fields to highlight rather than using "\*" you'll see faster results. That's regardless of choice of highlighter type

---

<div class="post-metadata">

**Author:** ![Nikesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikesh/32/86579_2.png) [@Nikesh](https://discuss.elastic.co/u/Nikesh)\
**Post date:** [November 21, 2018, 11:30am UTC](https://discuss.elastic.co/t/fvh-highlighting-taking-longer-time-than-unified-highlighting/157643/5 "2018-11-21T11:30:34Z")

</div>

Okay!  
I have around hundred fields. On a free text search it has to search and highlight all such fields  
(including .keyword and text fields) Is there a method to exclude .keyword fields on search and highlight?

---

<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:** [December 19, 2018, 11:30am UTC](https://discuss.elastic.co/t/fvh-highlighting-taking-longer-time-than-unified-highlighting/157643/6 "2018-12-19T11:30:39Z")

</div>

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