# Highlighting - not working

**URL:** <https://discuss.elastic.co/t/highlighting-not-working/13676>\
**Category:** Elasticsearch\
**Created:** [September 18, 2013, 3:38pm UTC](https://discuss.elastic.co/t/highlighting-not-working/13676 "2013-09-18T15:38:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nayeli\_Santacruz](https://avatars.discourse-cdn.com/v4/letter/n/bb73d2/32.png) [@Nayeli\_Santacruz](https://discuss.elastic.co/u/Nayeli_Santacruz)\
**Post date:** [September 18, 2013, 3:38pm UTC](https://discuss.elastic.co/t/highlighting-not-working/13676/1 "2013-09-18T15:38:39Z")

</div>

Greetings to all  
I have the following problem:

I'm doing some tests with facetings

My script is as follows:

> <https://gist.github.com/nayelisantacruz/6610862>

the result I get is as follows:

{  
"took": 2,  
"timed\_out": false,  
"\_shards": {  
"total": 5,  
"successful": 5,  
"failed": 0  
},  
"hits": {  
"total": 2,  
"max\_score": 1,  
"hits": []  
},  
"facets": {  
"title": {  
"\_type": "terms",  
"missing": 0,  
"total": 2,  
"other": 0,  
"terms": [  
{  
"term": "JavaScript",  
"count": 1  
},  
{  
"term": "Java Platform, Standard Edition",  
"count": 1  
}  
]  
}  
}  
}

which is fine, but the problem is that I can not display the "highlighting"

I was expecting a result like the following:

..........  
..........  
..........

```
"facets": {
    "title": {
        "_type": "terms",
        "missing": 0,
        "total": 2,
        "other": 0,
        "terms": [
            {
                "term": "<b>Java</b>Script",
                "count": 1
            },
            {
                "term": "<b>Java</b> Platform, Standard Edition",
                "count": 1
            }
        ]
    }
}

```

..........  
..........  
..........

Anyone can help me and tell me what I'm doing wrong or what I'm missing,  
please

Thank you very much for your attention

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [September 18, 2013, 9:58pm UTC](https://discuss.elastic.co/t/highlighting-not-working/13676/2 "2013-09-18T21:58:49Z")

</div>

Hey

highlighting does not work inside facet results, but only for search  
results (which you set to 0 using the size parameter).

--Alex

On Wed, Sep 18, 2013 at 5:38 PM, Nayeli Santacruz \<  
[nayeli.santacruz2.0@gmail.com](mailto:nayeli.santacruz2.0@gmail.com)\> wrote:

> Greetings to all  
> I have the following problem:
> 
> I'm doing some tests with facetings
> 
> My script is as follows:
> 
> [Elasticsearch - faceting tests · GitHub](https://gist.github.com/nayelisantacruz/6610862)
> 
> the result I get is as follows:
> 
> {  
> "took": 2,  
> "timed\_out": false,  
> "\_shards": {  
> "total": 5,  
> "successful": 5,  
> "failed": 0  
> },  
> "hits": {  
> "total": 2,  
> "max\_score": 1,  
> "hits":   
> },  
> "facets": {  
> "title": {  
> "\_type": "terms",  
> "missing": 0,  
> "total": 2,  
> "other": 0,  
> "terms": [  
> {  
> "term": "JavaScript",  
> "count": 1  
> },  
> {  
> "term": "Java Platform, Standard Edition",  
> "count": 1  
> }  
> ]  
> }  
> }  
> }
> 
> which is fine, but the problem is that I can not display the "highlighting"
> 
> I was expecting a result like the following:
> 
> ..........  
> ..........  
> ..........
> 
> ```
> "facets": {
> "title": {
> "_type": "terms",
> "missing": 0,
> "total": 2,
> "other": 0,
> "terms": [
> {
> "term": "<b>Java</b>Script",
> "count": 1
> },
> {
> "term": "<b>Java</b> Platform, Standard Edition",
> "count": 1
> }
> ]
> }
> }
> 
> ```
> 
> ..........  
> ..........  
> ..........
> 
> Anyone can help me and tell me what I'm doing wrong or what I'm missing,  
> please
> 
> Thank you very much for your attention
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:15am UTC](https://discuss.elastic.co/t/highlighting-not-working/13676/3 "2017-07-06T02:15:38Z")

</div>


