# Problem with highlight on attachment type

**URL:** <https://discuss.elastic.co/t/problem-with-highlight-on-attachment-type/13105>\
**Category:** Elasticsearch\
**Created:** [August 7, 2013, 2:01pm UTC](https://discuss.elastic.co/t/problem-with-highlight-on-attachment-type/13105 "2013-08-07T14:01:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Max\_Just](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@Max\_Just](https://discuss.elastic.co/u/Max_Just)\
**Post date:** [August 7, 2013, 2:01pm UTC](https://discuss.elastic.co/t/problem-with-highlight-on-attachment-type/13105/1 "2013-08-07T14:01:03Z")

</div>

Hello, I have a problem with highlighting, in the follow index:

curl -XPUT "http://$EL\_IP:9200/docs" -d '{  
"settings": {  
"index": {  
"number\_of\_shards": 5,  
"number\_of\_replicas": 1,  
"analysis": {  
"analyzer": {  
"main\_analyzer": {  
"type": "custom",  
"tokenizer": "standard",  
"filter": ["lowercase", "russian\_morphology", "english\_morphology"]  
}  
}  
}  
}  
},  
"mappings": {  
"extern": {  
"properties": {  
"url" : { "type" : "string"},  
"summary" : {  
"type" : "attachment",  
"analyzer": "snowball",  
"fields" : {  
"content": {"analyzer": "main\_analyzer"},  
"file" : {"store": "yes", "analyzer": "standard"},  
"date" : {"store": "yes"},  
"author" : {"store" : "yes"},  
}  
},  
"last\_processed" : { "type" : "date", "index" : "no" }  
}  
}  
}  
}'

not working highlighting with, the follow query:

{  
"fields": [  
"\_id"  
],  
"query": {  
"query\_string": {  
"query": "searchtext"  
}  
},  
"highlight": {  
"fields": {  
"summary": {}  
}  
}  
}

elastic return data without highlight. Anybody help.

--  
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:22am UTC](https://discuss.elastic.co/t/problem-with-highlight-on-attachment-type/13105/2 "2017-07-06T02:22:25Z")

</div>


