# Mapper-attachments-helloworld not working

**URL:** <https://discuss.elastic.co/t/mapper-attachments-helloworld-not-working/60359>\
**Category:** Elasticsearch\
**Created:** [September 13, 2016, 9:47am UTC](https://discuss.elastic.co/t/mapper-attachments-helloworld-not-working/60359 "2016-09-13T09:47:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dror\_Musahy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dror_musahy/32/19113_2.png) [@Dror\_Musahy](https://discuss.elastic.co/u/Dror_Musahy)\
**Post date:** [September 13, 2016, 9:47am UTC](https://discuss.elastic.co/t/mapper-attachments-helloworld-not-working/60359/1 "2016-09-13T09:47:08Z")

</div>

really new in elastic world, and install 2.4 + mapper-attachments plugin.

try index documnts with sample:  
[https://www.elastic.co/guide/en/elasticsearch/plugins/master/mapper-attachments-helloworld.html](https://www.elastic.co/guide/en/elasticsearch/plugins/master/mapper-attachments-helloworld.html)

but search found nothing  
POST /trying-out-mapper-attachments/person/\_search  
{  
"query": {  
"query\_string": {  
"query": "ipsum"  
}}}

if I add regualr field like :

POST /trying-out-mapper-attachments/person/3?refresh  
{  
"cv": "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=",  
"firstName" : "dror"  
}  
then "dror" found, but on attachment field its not working.

can not found any logs, and even dont knoew if problem is with Index nor Query

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 13, 2016, 9:58am UTC](https://discuss.elastic.co/t/mapper-attachments-helloworld-not-working/60359/2 "2016-09-13T09:58:50Z")

</div>

Please format your code using `</>` icon. It will make your post more readable.

What is your mapping?

---

<div class="post-metadata">

**Author:** ![Dror\_Musahy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dror_musahy/32/19113_2.png) [@Dror\_Musahy](https://discuss.elastic.co/u/Dror_Musahy)\
**Post date:** [September 13, 2016, 10:14am UTC](https://discuss.elastic.co/t/mapper-attachments-helloworld-not-working/60359/3 "2016-09-13T10:14:20Z")

</div>

GET [http://localhost:9200/stackoverflow/\_mapping/post](http://localhost:9200/stackoverflow/_mapping/post)

```
{
   "stackoverflow": {
      "mappings": {
         "post": {
            "properties": {
               "answerCount": {
                  "type": "integer"
               },
               "body": {
                  "type": "string"
               },
               "creationDate": {
                  "type": "date",
                  "format": "strict_date_optional_time||epoch_millis"
               },
               "id": {
                  "type": "string"
               },
               "score": {
                  "type": "integer"
               },
               "suggest": {
                  "type": "completion",
                  "analyzer": "simple",
                  "payloads": false,
                  "preserve_separators": true,
                  "preserve_position_increments": true,
                  "max_input_length": 50
               },
               "tags": {
                  "type": "string",
                  "index": "not_analyzed"
               },
               "title": {
                  "type": "string"
               }
            }
         }
      }
   }
}
```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 13, 2016, 11:38am UTC](https://discuss.elastic.co/t/mapper-attachments-helloworld-not-working/60359/4 "2016-09-13T11:38:27Z")

</div>

The first post you sent refers to `trying-out-mapper-attachments` index and `person` type.  
Here you are showing an index named `stackoverflow` and a `post` type.

It's wrong.

Make sure you read [https://www.elastic.co/guide/en/elasticsearch/plugins/current/mapper-attachments-helloworld.html](https://www.elastic.co/guide/en/elasticsearch/plugins/current/mapper-attachments-helloworld.html)

---

<div class="post-metadata">

**Author:** ![Dror\_Musahy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dror_musahy/32/19113_2.png) [@Dror\_Musahy](https://discuss.elastic.co/u/Dror_Musahy)\
**Post date:** [September 13, 2016, 12:25pm UTC](https://discuss.elastic.co/t/mapper-attachments-helloworld-not-working/60359/5 "2016-09-13T12:25:17Z")

</div>

really embarrassing.  
its works fine.  
thanks.

---

<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 5, 2017, 10:20pm UTC](https://discuss.elastic.co/t/mapper-attachments-helloworld-not-working/60359/6 "2017-07-05T22:20:44Z")

</div>


