# Highlighting only works if I put store : yes in the mapping

**URL:** <https://discuss.elastic.co/t/highlighting-only-works-if-i-put-store-yes-in-the-mapping/8224>\
**Category:** Elasticsearch\
**Created:** [June 26, 2012, 9:35am UTC](https://discuss.elastic.co/t/highlighting-only-works-if-i-put-store-yes-in-the-mapping/8224 "2012-06-26T09:35:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fonzo14](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@fonzo14](https://discuss.elastic.co/u/fonzo14)\
**Post date:** [June 26, 2012, 9:35am UTC](https://discuss.elastic.co/t/highlighting-only-works-if-i-put-store-yes-in-the-mapping/8224/1 "2012-06-26T09:35:18Z")

</div>

Hi all,

I'm an elasticsearch newbie.

I was playing with the highlight feature and i have been able to make  
it work only if I set store:yes in the mapping. Otherwise it did not  
work even with terms\_vector : with\_positions\_offsets.

Reading the doc, I understand that if the field is not stored, it  
would be retrieved from \_source. Am I wrong or highlight should  
normally work with the \_source field ?

I'm on the last stable ES version

my mapping is quite simple :

{  
"article" : {  
"analyzer" : "french",  
"properties" : {  
"id" : {  
"type" : "long"  
},  
"published\_at" : {  
"type" : "date",  
"format" : "dateOptionalTime"  
},  
"summary" : {  
"type" : "string"  
},  
"title" : {  
"type" : "string"  
},  
"url" : {  
"type" : "string"  
}  
}  
}  
}

My query too :

{"query":{"query\_string":{"query":"perchoir"}},"highlight":{"fields":  
{"title":{}}}}

If I add store:yes to the previous mapping, highlighting works  
otherwise no.

Thanks all

---

<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:22am UTC](https://discuss.elastic.co/t/highlighting-only-works-if-i-put-store-yes-in-the-mapping/8224/2 "2017-07-06T03:22:32Z")

</div>


