# Highlighting API: suggestion for new functionality

**URL:** <https://discuss.elastic.co/t/highlighting-api-suggestion-for-new-functionality/3192>\
**Category:** Elasticsearch\
**Created:** [August 6, 2010, 1:37pm UTC](https://discuss.elastic.co/t/highlighting-api-suggestion-for-new-functionality/3192 "2010-08-06T13:37:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [August 6, 2010, 1:37pm UTC](https://discuss.elastic.co/t/highlighting-api-suggestion-for-new-functionality/3192/1 "2010-08-06T13:37:43Z")

</div>

Hi,

1. Would it be possible to add support for custom FragmentsBuilder ?  
I would like to see something like NullFragmenter and Fragmenter that is  
aware of sentence boundaries.

2. Would it be possible to apply highlighting to a REST GET operation?  
[http://www.elasticsearch.com/docs/elasticsearch/rest\_api/get/](http://www.elasticsearch.com/docs/elasticsearch/rest_api/get/)  
I would like to see an option to get fields or \_source value with specific  
fields highlighted.  
One way how to get similar result now is using term query on an ID field (to  
get one specific document) which would allow to use highlight DSL but still  
getting full content of some field highlighted would require either  
NullFragmenter (which is not implemented now) or setting value of  
fragment\_size to some arbitrary large number.

Regards,  
Lukas

---

<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:** [August 8, 2010, 7:38pm UTC](https://discuss.elastic.co/t/highlighting-api-suggestion-for-new-functionality/3192/2 "2010-08-08T19:38:21Z")

</div>

Yea, both are possible. Want to open issues for them?

On Fri, Aug 6, 2010 at 4:37 PM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) wrote:

> Hi,
> 
> 1. Would it be possible to add support for custom FragmentsBuilder ?  
> I would like to see something like NullFragmenter and Fragmenter that is  
> aware of sentence boundaries.
> 
> 2. Would it be possible to apply highlighting to a REST GET operation?  
> [http://www.elasticsearch.com/docs/elasticsearch/rest\_api/get/](http://www.elasticsearch.com/docs/elasticsearch/rest_api/get/)  
> I would like to see an option to get fields or \_source value with specific  
> fields highlighted.  
> One way how to get similar result now is using term query on an ID field  
> (to get one specific document) which would allow to use highlight DSL but  
> still getting full content of some field highlighted would require either  
> NullFragmenter (which is not implemented now) or setting value of  
> fragment\_size to some arbitrary large number.
> 
> Regards,  
> Lukas

---

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [August 8, 2010, 8:02pm UTC](https://discuss.elastic.co/t/highlighting-api-suggestion-for-new-functionality/3192/3 "2010-08-08T20:02:06Z")

</div>

Cool, I will open tickets for these two.

On Sun, Aug 8, 2010 at 9:38 PM, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)wrote:

> Yea, both are possible. Want to open issues for them?
> 
> On Fri, Aug 6, 2010 at 4:37 PM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) wrote:
> 
> > Hi,
> > 
> > 1. Would it be possible to add support for custom FragmentsBuilder ?  
> > I would like to see something like NullFragmenter and Fragmenter that is  
> > aware of sentence boundaries.
> > 
> > 2. Would it be possible to apply highlighting to a REST GET operation?  
> > [http://www.elasticsearch.com/docs/elasticsearch/rest\_api/get/](http://www.elasticsearch.com/docs/elasticsearch/rest_api/get/)  
> > I would like to see an option to get fields or \_source value with  
> > specific fields highlighted.  
> > One way how to get similar result now is using term query on an ID field  
> > (to get one specific document) which would allow to use highlight DSL but  
> > still getting full content of some field highlighted would require either  
> > NullFragmenter (which is not implemented now) or setting value of  
> > fragment\_size to some arbitrary large number.
> > 
> > Regards,  
> > Lukas

---

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [August 8, 2010, 8:17pm UTC](https://discuss.elastic.co/t/highlighting-api-suggestion-for-new-functionality/3192/4 "2010-08-08T20:17:19Z")

</div>

> <https://github.com/elastic/elasticsearch/issues/307>
>
> I would like to see possibility to use NullFragmenter and provide custom impleme…ntation of Fragmenter (a built-in Fragmenter that is aware of sentence boundaries would be cool).

> <https://github.com/elastic/elasticsearch/issues/308>
>
> I would like to see an option to get \`fields\` or \`\_source\` value with specific f…ields highlighted.
> One way how to get similar result now is using term query on an ID field (to get one specific document) which would allow to use highlight DSL but still getting full content of some field highlighted would require either NullFragmenter (which is not implemented now) or setting value of \`fragment\_size\` to some arbitrary large number.

On Sun, Aug 8, 2010 at 10:02 PM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) wrote:

> Cool, I will open tickets for these two.
> 
> On Sun, Aug 8, 2010 at 9:38 PM, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)wrote:
> 
> > Yea, both are possible. Want to open issues for them?
> > 
> > On Fri, Aug 6, 2010 at 4:37 PM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com)wrote:
> > 
> > > Hi,
> > > 
> > > 1. Would it be possible to add support for custom FragmentsBuilder ?  
> > > I would like to see something like NullFragmenter and Fragmenter that is  
> > > aware of sentence boundaries.
> > > 
> > > 2. Would it be possible to apply highlighting to a REST GET operation?  
> > > [http://www.elasticsearch.com/docs/elasticsearch/rest\_api/get/](http://www.elasticsearch.com/docs/elasticsearch/rest_api/get/)  
> > > I would like to see an option to get fields or \_source value with  
> > > specific fields highlighted.  
> > > One way how to get similar result now is using term query on an ID field  
> > > (to get one specific document) which would allow to use highlight DSL but  
> > > still getting full content of some field highlighted would require either  
> > > NullFragmenter (which is not implemented now) or setting value of  
> > > fragment\_size to some arbitrary large number.
> > > 
> > > Regards,  
> > > Lukas

---

<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:** [August 8, 2010, 9:20pm UTC](https://discuss.elastic.co/t/highlighting-api-suggestion-for-new-functionality/3192/5 "2010-08-08T21:20:44Z")

</div>

If you want to try and tackle them, I am here to help.

On Sun, Aug 8, 2010 at 11:17 PM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) wrote:

> [Highlighting API: Add support for custom FragmentsBuilder · Issue #307 · elastic/elasticsearch · GitHub](http://github.com/elasticsearch/elasticsearch/issues/issue/307)  
> [Highlighting API: Apply highlighting to REST GET operation · Issue #308 · elastic/elasticsearch · GitHub](http://github.com/elasticsearch/elasticsearch/issues/issue/308)
> 
> On Sun, Aug 8, 2010 at 10:02 PM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com)wrote:
> 
> > Cool, I will open tickets for these two.
> > 
> > On Sun, Aug 8, 2010 at 9:38 PM, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)wrote:
> > 
> > > Yea, both are possible. Want to open issues for them?
> > > 
> > > On Fri, Aug 6, 2010 at 4:37 PM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com)wrote:
> > > 
> > > > Hi,
> > > > 
> > > > 1. Would it be possible to add support for custom FragmentsBuilder ?  
> > > > I would like to see something like NullFragmenter and Fragmenter that is  
> > > > aware of sentence boundaries.
> > > > 
> > > > 2. Would it be possible to apply highlighting to a REST GET operation?  
> > > > [http://www.elasticsearch.com/docs/elasticsearch/rest\_api/get/](http://www.elasticsearch.com/docs/elasticsearch/rest_api/get/)  
> > > > I would like to see an option to get fields or \_source value with  
> > > > specific fields highlighted.  
> > > > One way how to get similar result now is using term query on an ID field  
> > > > (to get one specific document) which would allow to use highlight DSL but  
> > > > still getting full content of some field highlighted would require either  
> > > > NullFragmenter (which is not implemented now) or setting value of  
> > > > fragment\_size to some arbitrary large number.
> > > > 
> > > > Regards,  
> > > > Lukas

---

<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, 4:21am UTC](https://discuss.elastic.co/t/highlighting-api-suggestion-for-new-functionality/3192/6 "2017-07-06T04:21:04Z")

</div>


