# Extension point for custom highlight logic

**URL:** <https://discuss.elastic.co/t/extension-point-for-custom-highlight-logic/7473>\
**Category:** Elasticsearch\
**Created:** [April 26, 2012, 12:24pm UTC](https://discuss.elastic.co/t/extension-point-for-custom-highlight-logic/7473 "2012-04-26T12:24:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![vineeth\_mohan](https://avatars.discourse-cdn.com/v4/letter/v/bc79bd/32.png) [@vineeth\_mohan](https://discuss.elastic.co/u/vineeth_mohan)\
**Post date:** [April 26, 2012, 12:24pm UTC](https://discuss.elastic.co/t/extension-point-for-custom-highlight-logic/7473/1 "2012-04-26T12:24:40Z")

</div>

Hi ,

Is there a extension point for custom highlighting in elasticSearch.  
If so , kindly tell where i can start with.

Thanks  
Vineeth

---

<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:** [April 27, 2012, 11:13am UTC](https://discuss.elastic.co/t/extension-point-for-custom-highlight-logic/7473/2 "2012-04-27T11:13:57Z")

</div>

No, there isn't an extension point for it. Why do you need it?

On Thu, Apr 26, 2012 at 3:24 PM, Vineeth Mohan [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com)wrote:

> Hi ,
> 
> Is there a extension point for custom highlighting in elasticSearch.  
> If so , kindly tell where i can start with.
> 
> Thanks  
> Vineeth

---

<div class="post-metadata">

**Author:** ![vineeth\_mohan](https://avatars.discourse-cdn.com/v4/letter/v/bc79bd/32.png) [@vineeth\_mohan](https://discuss.elastic.co/u/vineeth_mohan)\
**Post date:** [April 27, 2012, 1:23pm UTC](https://discuss.elastic.co/t/extension-point-for-custom-highlight-logic/7473/3 "2012-04-27T13:23:39Z")

</div>

I want highlighted text of html am storing. I don’t want to store both html  
and stripped html neither.  
I was wondering how the attachment plugin is doing it.  
Though we are giving a base64 encoded text , its able to generate  
highlighted text of stripped text from the attachment.  
Is it storing both the base64 text and the stripped text while indexing an  
attachment ?

Currently am getting highlighted text and then stripping the tags from it  
but then as you can guess it has some issues.  
If you know some work arounds , please let me know.

Thanks  
Vineeth

On Fri, Apr 27, 2012 at 4:43 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> No, there isn't an extension point for it. Why do you need it?
> 
> On Thu, Apr 26, 2012 at 3:24 PM, Vineeth Mohan [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com)wrote:
> 
> > Hi ,
> > 
> > Is there a extension point for custom highlighting in elasticSearch.  
> > If so , kindly tell where i can start with.
> > 
> > Thanks  
> > Vineeth

---

<div class="post-metadata">

**Author:** ![vineeth\_mohan](https://avatars.discourse-cdn.com/v4/letter/v/bc79bd/32.png) [@vineeth\_mohan](https://discuss.elastic.co/u/vineeth_mohan)\
**Post date:** [April 29, 2012, 3:25pm UTC](https://discuss.elastic.co/t/extension-point-for-custom-highlight-logic/7473/4 "2012-04-29T15:25:07Z")

</div>

@Shay - Is there any suggestion that you have without eating up space ?

Also will you consider opening a plugin point for highlighting. Am sure  
many will benefit from it.

Thanks  
Vineeth

On Fri, Apr 27, 2012 at 6:53 PM, Vineeth Mohan [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com)wrote:

> I want highlighted text of html am storing. I don’t want to store both  
> html and stripped html neither.  
> I was wondering how the attachment plugin is doing it.  
> Though we are giving a base64 encoded text , its able to generate  
> highlighted text of stripped text from the attachment.  
> Is it storing both the base64 text and the stripped text while indexing an  
> attachment ?
> 
> Currently am getting highlighted text and then stripping the tags from it  
> but then as you can guess it has some issues.  
> If you know some work arounds , please let me know.
> 
> Thanks  
> Vineeth
> 
> On Fri, Apr 27, 2012 at 4:43 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> 
> > No, there isn't an extension point for it. Why do you need it?
> > 
> > On Thu, Apr 26, 2012 at 3:24 PM, Vineeth Mohan \<[vineethmohan@algotree.com](mailto:vineethmohan@algotree.com)
> > 
> > > wrote:
> > 
> > > Hi ,
> > > 
> > > Is there a extension point for custom highlighting in elasticSearch.  
> > > If so , kindly tell where i can start with.
> > > 
> > > Thanks  
> > > Vineeth

---

<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:** [April 29, 2012, 3:28pm UTC](https://discuss.elastic.co/t/extension-point-for-custom-highlight-logic/7473/5 "2012-04-29T15:28:56Z")

</div>

Why not strip the text from html before you index the data? Do you need to  
html version as well?

On Sun, Apr 29, 2012 at 6:25 PM, Vineeth Mohan [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com)wrote:

> @Shay - Is there any suggestion that you have without eating up space ?
> 
> Also will you consider opening a plugin point for highlighting. Am sure  
> many will benefit from it.
> 
> Thanks  
> Vineeth
> 
> On Fri, Apr 27, 2012 at 6:53 PM, Vineeth Mohan [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com)wrote:
> 
> > I want highlighted text of html am storing. I don’t want to store both  
> > html and stripped html neither.  
> > I was wondering how the attachment plugin is doing it.  
> > Though we are giving a base64 encoded text , its able to generate  
> > highlighted text of stripped text from the attachment.  
> > Is it storing both the base64 text and the stripped text while indexing  
> > an attachment ?
> > 
> > Currently am getting highlighted text and then stripping the tags from it  
> > but then as you can guess it has some issues.  
> > If you know some work arounds , please let me know.
> > 
> > Thanks  
> > Vineeth
> > 
> > On Fri, Apr 27, 2012 at 4:43 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> > 
> > > No, there isn't an extension point for it. Why do you need it?
> > > 
> > > On Thu, Apr 26, 2012 at 3:24 PM, Vineeth Mohan \<  
> > > [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com)\> wrote:
> > > 
> > > > Hi ,
> > > > 
> > > > Is there a extension point for custom highlighting in elasticSearch.  
> > > > If so , kindly tell where i can start with.
> > > > 
> > > > Thanks  
> > > > Vineeth

---

<div class="post-metadata">

**Author:** ![vineeth\_mohan](https://avatars.discourse-cdn.com/v4/letter/v/bc79bd/32.png) [@vineeth\_mohan](https://discuss.elastic.co/u/vineeth_mohan)\
**Post date:** [April 29, 2012, 3:39pm UTC](https://discuss.elastic.co/t/extension-point-for-custom-highlight-logic/7473/6 "2012-04-29T15:39:15Z")

</div>

yes , i need the HTML too.  
I was looking for option where i dont have to store both HTML and stripped  
text.

Thanks  
Vineeth

On Sun, Apr 29, 2012 at 8:58 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> Why not strip the text from html before you index the data? Do you need to  
> html version as well?
> 
> On Sun, Apr 29, 2012 at 6:25 PM, Vineeth Mohan [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com)wrote:
> 
> > @Shay - Is there any suggestion that you have without eating up space ?
> > 
> > Also will you consider opening a plugin point for highlighting. Am sure  
> > many will benefit from it.
> > 
> > Thanks  
> > Vineeth
> > 
> > On Fri, Apr 27, 2012 at 6:53 PM, Vineeth Mohan \<[vineethmohan@algotree.com](mailto:vineethmohan@algotree.com)
> > 
> > > wrote:
> > 
> > > I want highlighted text of html am storing. I don’t want to store both  
> > > html and stripped html neither.  
> > > I was wondering how the attachment plugin is doing it.  
> > > Though we are giving a base64 encoded text , its able to generate  
> > > highlighted text of stripped text from the attachment.  
> > > Is it storing both the base64 text and the stripped text while indexing  
> > > an attachment ?
> > > 
> > > Currently am getting highlighted text and then stripping the tags from  
> > > it but then as you can guess it has some issues.  
> > > If you know some work arounds , please let me know.
> > > 
> > > Thanks  
> > > Vineeth
> > > 
> > > On Fri, Apr 27, 2012 at 4:43 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> > > 
> > > > No, there isn't an extension point for it. Why do you need it?
> > > > 
> > > > On Thu, Apr 26, 2012 at 3:24 PM, Vineeth Mohan \<  
> > > > [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com)\> wrote:
> > > > 
> > > > > Hi ,
> > > > > 
> > > > > Is there a extension point for custom highlighting in elasticSearch.  
> > > > > If so , kindly tell where i can start with.
> > > > > 
> > > > > Thanks  
> > > > > Vineeth

---

<div class="post-metadata">

**Author:** ![vineeth\_mohan](https://avatars.discourse-cdn.com/v4/letter/v/bc79bd/32.png) [@vineeth\_mohan](https://discuss.elastic.co/u/vineeth_mohan)\
**Post date:** [April 29, 2012, 3:46pm UTC](https://discuss.elastic.co/t/extension-point-for-custom-highlight-logic/7473/7 "2012-04-29T15:46:33Z")

</div>

Along with this i have custom file formats in my company. If there was a  
plugin point for highlighting , i could have easily provide a zero space  
overhead solution.

Thanks  
Vineeth

On Sun, Apr 29, 2012 at 9:09 PM, Vineeth Mohan [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com)wrote:

> yes , i need the HTML too.  
> I was looking for option where i dont have to store both HTML and stripped  
> text.
> 
> Thanks  
> Vineeth
> 
> On Sun, Apr 29, 2012 at 8:58 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> 
> > Why not strip the text from html before you index the data? Do you need  
> > to html version as well?
> > 
> > On Sun, Apr 29, 2012 at 6:25 PM, Vineeth Mohan \<[vineethmohan@algotree.com](mailto:vineethmohan@algotree.com)
> > 
> > > wrote:
> > 
> > > @Shay - Is there any suggestion that you have without eating up space ?
> > > 
> > > Also will you consider opening a plugin point for highlighting. Am sure  
> > > many will benefit from it.
> > > 
> > > Thanks  
> > > Vineeth
> > > 
> > > On Fri, Apr 27, 2012 at 6:53 PM, Vineeth Mohan \<  
> > > [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com)\> wrote:
> > > 
> > > > I want highlighted text of html am storing. I don’t want to store both  
> > > > html and stripped html neither.  
> > > > I was wondering how the attachment plugin is doing it.  
> > > > Though we are giving a base64 encoded text , its able to generate  
> > > > highlighted text of stripped text from the attachment.  
> > > > Is it storing both the base64 text and the stripped text while indexing  
> > > > an attachment ?
> > > > 
> > > > Currently am getting highlighted text and then stripping the tags from  
> > > > it but then as you can guess it has some issues.  
> > > > If you know some work arounds , please let me know.
> > > > 
> > > > Thanks  
> > > > Vineeth
> > > > 
> > > > On Fri, Apr 27, 2012 at 4:43 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> > > > 
> > > > > No, there isn't an extension point for it. Why do you need it?
> > > > > 
> > > > > On Thu, Apr 26, 2012 at 3:24 PM, Vineeth Mohan \<  
> > > > > [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com)\> wrote:
> > > > > 
> > > > > > Hi ,
> > > > > > 
> > > > > > Is there a extension point for custom highlighting in elasticSearch.  
> > > > > > If so , kindly tell where i can start with.
> > > > > > 
> > > > > > Thanks  
> > > > > > Vineeth

---

<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:30am UTC](https://discuss.elastic.co/t/extension-point-for-custom-highlight-logic/7473/8 "2017-07-06T03:30:43Z")

</div>


