# About query

**URL:** <https://discuss.elastic.co/t/about-query/6790>\
**Category:** Elasticsearch\
**Created:** [February 23, 2012, 1:44pm UTC](https://discuss.elastic.co/t/about-query/6790 "2012-02-23T13:44:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Goog\_Jobs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/goog_jobs/32/2894_2.png) [@Goog\_Jobs](https://discuss.elastic.co/u/Goog_Jobs)\
**Post date:** [February 23, 2012, 1:44pm UTC](https://discuss.elastic.co/t/about-query/6790/1 "2012-02-23T13:44:08Z")

</div>

Hi, in the post [http://www.elasticsearch.org/tutorials/2011/07/18/attachment-type-in-action.html](http://www.elasticsearch.org/tutorials/2011/07/18/attachment-type-in-action.html)  
,  
Attachment Type in Action ,

curl -X PUT "localhost:9200/test/attachment/\_mapping" -d '{  
"attachment" : {  
"properties" : {  
"file" : {  
"type" : "attachment",  
"fields" : {  
"title" : { "store" : "yes" },  
"file" : { "term\_vector":"with\_positions\_offsets",  
"store":"yes" }  
}  
}  
}  
}  
}'

curl "localhost:9200/\_search?pretty=true" -d '{  
"fields" : ["title"],  
"query" : {  
"query\_string" : {  
"query" : "amplifier"  
}  
},  
"highlight" : {  
"fields" : {  
"file" : {}  
}  
}  
}'

in here, what is function for "fields" : ["title"] , the query  
also can search the content of an attchment .

---

<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:38am UTC](https://discuss.elastic.co/t/about-query/6790/2 "2017-07-06T03:38:29Z")

</div>


