# Proximity and phrases search fast-vector-highlighter vs. highlighter + exposing highlighter

**URL:** <https://discuss.elastic.co/t/proximity-and-phrases-search-fast-vector-highlighter-vs-highlighter-exposing-highlighter/5394>\
**Category:** Elasticsearch\
**Created:** [September 16, 2011, 1:22pm UTC](https://discuss.elastic.co/t/proximity-and-phrases-search-fast-vector-highlighter-vs-highlighter-exposing-highlighter/5394 "2011-09-16T13:22:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomislav\_Poljak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tomislav_poljak/32/1177_2.png) [@Tomislav\_Poljak](https://discuss.elastic.co/u/Tomislav_Poljak)\
**Post date:** [September 16, 2011, 1:22pm UTC](https://discuss.elastic.co/t/proximity-and-phrases-search-fast-vector-highlighter-vs-highlighter-exposing-highlighter/5394/1 "2011-09-16T13:22:24Z")

</div>

Hi,  
here [https://gist.github.com/1222046](https://gist.github.com/1222046) is a bug reconstruction for  
highlighting issues with fast-vector-highlighter in cases of proximity  
search and exact phrases searching (when exact phrases contain stop  
words).

Reconstruction shows two cases where default/plain highlighter works  
correctly/better then the fast-vector-highlighter (maybe there are  
some cases/queries where situation is reversed), so my question is: if  
these bugs in fast-vector-highlighter code require some time to be  
fixed maybe it would be useful to expose highlighter (as a quick fix),  
so in the case where field is stored (with "term\_vector" :  
"with\_positions\_offsets") users can chose between using  
fast-vector-highlighter and default/plain highlighter. Because, even  
if fast-vector-highlighter is much faster and should be used for  
highlighting matches in fields with term vectors stored, in some cases  
(like proximity and stop-word phrases) it does not work correctly, so  
being able to use plain highlighter would help.

Thanks,

Tomislav

---

<div class="post-metadata">

**Author:** ![Robert\_2](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@Robert\_2](https://discuss.elastic.co/u/Robert_2)\
**Post date:** [May 25, 2012, 3:53pm UTC](https://discuss.elastic.co/t/proximity-and-phrases-search-fast-vector-highlighter-vs-highlighter-exposing-highlighter/5394/2 "2012-05-25T15:53:03Z")

</div>

I was wondering if you ever found a way to correctly use fast vector  
highlighting with proximity searches, I am running into the same problem.

Thanks,  
Robert

On Friday, September 16, 2011 9:22:24 AM UTC-4, Tomislav Poljak wrote:

> Hi,  
> here [Proximity and phrase search highlighting using fast-vector-highlighter vs. highlighter · GitHub](https://gist.github.com/1222046) is a bug reconstruction for  
> highlighting issues with fast-vector-highlighter in cases of proximity  
> search and exact phrases searching (when exact phrases contain stop  
> words).
> 
> Reconstruction shows two cases where default/plain highlighter works  
> correctly/better then the fast-vector-highlighter (maybe there are  
> some cases/queries where situation is reversed), so my question is: if  
> these bugs in fast-vector-highlighter code require some time to be  
> fixed maybe it would be useful to expose highlighter (as a quick fix),  
> so in the case where field is stored (with "term\_vector" :  
> "with\_positions\_offsets") users can chose between using  
> fast-vector-highlighter and default/plain highlighter. Because, even  
> if fast-vector-highlighter is much faster and should be used for  
> highlighting matches in fields with term vectors stored, in some cases  
> (like proximity and stop-word phrases) it does not work correctly, so  
> being able to use plain highlighter would help.
> 
> Thanks,
> 
> Tomislav

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [May 29, 2012, 7:43pm UTC](https://discuss.elastic.co/t/proximity-and-phrases-search-fast-vector-highlighter-vs-highlighter-exposing-highlighter/5394/3 "2012-05-29T19:43:47Z")

</div>

I need to chase it down with the actual implementation of the fast vector  
highlighter, not too difficult, just some time consuming, can you open an  
issue and we can chase it down there?

On Fri, Sep 16, 2011 at 3:22 PM, Tomislav Poljak [tpoljak@gmail.com](mailto:tpoljak@gmail.com) wrote:

> Hi,  
> here [Proximity and phrase search highlighting using fast-vector-highlighter vs. highlighter · GitHub](https://gist.github.com/1222046) is a bug reconstruction for  
> highlighting issues with fast-vector-highlighter in cases of proximity  
> search and exact phrases searching (when exact phrases contain stop  
> words).
> 
> Reconstruction shows two cases where default/plain highlighter works  
> correctly/better then the fast-vector-highlighter (maybe there are  
> some cases/queries where situation is reversed), so my question is: if  
> these bugs in fast-vector-highlighter code require some time to be  
> fixed maybe it would be useful to expose highlighter (as a quick fix),  
> so in the case where field is stored (with "term\_vector" :  
> "with\_positions\_offsets") users can chose between using  
> fast-vector-highlighter and default/plain highlighter. Because, even  
> if fast-vector-highlighter is much faster and should be used for  
> highlighting matches in fields with term vectors stored, in some cases  
> (like proximity and stop-word phrases) it does not work correctly, so  
> being able to use plain highlighter would help.
> 
> Thanks,
> 
> Tomislav

---

<div class="post-metadata">

**Author:** ![Robert\_2](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@Robert\_2](https://discuss.elastic.co/u/Robert_2)\
**Post date:** [May 29, 2012, 9:02pm UTC](https://discuss.elastic.co/t/proximity-and-phrases-search-fast-vector-highlighter-vs-highlighter-exposing-highlighter/5394/4 "2012-05-29T21:02:00Z")

</div>

Created Issue - [Proximity and phrases search fast-vector-highlighter vs. highlighter + exposing highlighter · Issue #1986 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1986)

On Tuesday, May 29, 2012 3:43:47 PM UTC-4, kimchy wrote:

> I need to chase it down with the actual implementation of the fast vector  
> highlighter, not too difficult, just some time consuming, can you open an  
> issue and we can chase it down there?
> 
> On Fri, Sep 16, 2011 at 3:22 PM, Tomislav Poljak wrote:
> 
> > Hi,  
> > here [Proximity and phrase search highlighting using fast-vector-highlighter vs. highlighter · GitHub](https://gist.github.com/1222046) is a bug reconstruction for  
> > highlighting issues with fast-vector-highlighter in cases of proximity  
> > search and exact phrases searching (when exact phrases contain stop  
> > words).
> > 
> > Reconstruction shows two cases where default/plain highlighter works  
> > correctly/better then the fast-vector-highlighter (maybe there are  
> > some cases/queries where situation is reversed), so my question is: if  
> > these bugs in fast-vector-highlighter code require some time to be  
> > fixed maybe it would be useful to expose highlighter (as a quick fix),  
> > so in the case where field is stored (with "term\_vector" :  
> > "with\_positions\_offsets") users can chose between using  
> > fast-vector-highlighter and default/plain highlighter. Because, even  
> > if fast-vector-highlighter is much faster and should be used for  
> > highlighting matches in fields with term vectors stored, in some cases  
> > (like proximity and stop-word phrases) it does not work correctly, so  
> > being able to use plain highlighter would help.
> > 
> > Thanks,
> > 
> > Tomislav

---

<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, 3:26am UTC](https://discuss.elastic.co/t/proximity-and-phrases-search-fast-vector-highlighter-vs-highlighter-exposing-highlighter/5394/5 "2017-07-06T03:26:24Z")

</div>


