# Mapping with the Mapper Attachment Plugin

**URL:** <https://discuss.elastic.co/t/mapping-with-the-mapper-attachment-plugin/22497>\
**Category:** Elasticsearch\
**Created:** [March 3, 2015, 6:55pm UTC](https://discuss.elastic.co/t/mapping-with-the-mapper-attachment-plugin/22497 "2015-03-03T18:55:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Austin\_Harmon](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@Austin\_Harmon](https://discuss.elastic.co/u/Austin_Harmon)\
**Post date:** [March 3, 2015, 6:55pm UTC](https://discuss.elastic.co/t/mapping-with-the-mapper-attachment-plugin/22497/1 "2015-03-03T18:55:32Z")

</div>

Hello,

I am using the Mapper Attachment Plugin. This is the mapping that I tried  
to use:

curl -XPUT localhost:9200/historicdata/docs/\_mapping {"docs" :  
{"properties" : {"file" : {"type" : "attachment", "fields" : {"file" :  
{"index" : "no"}, "title" : {"store" : "yes"}, "keywords" : {"store" :  
"yes"}, "content\_type" : {"store" : "yes"}, "content\_length" : {"store" :  
"yes"} } } } } }  
{"error":"NullPointerException[null]", "status": 500}curl: (3) [globbing]  
unmatched brace in column 1  
curl: (6) Could not resolve host:  
curl: (3) [globbing] unmatched brace in column 1  
curl: (3) [globbing] unmatched brace in column 1  
curl: (3) [globbing] unmatched brace in column 1  
curl: (6) Could not resolve host: attachment,  
curl: (6) Could not resolve host: fields  
curl: (3) [globbing] unmatched brace in column 1  
curl: (3) [globbing] unmatched brace in column 1  
curl: (3) [globbing] unmatched close brace/bracket in column 3  
curl: (6) Could not resolve host: title  
curl: (3) [globbing] unmatched brace in column 1  
curl: (3) [globbing] unmatched close brace/bracket in column 4  
curl: (6) Could not resolve host: keywords  
curl: (3) [globbing] unmatched brace in column 1  
curl: (3) [globbing] unmatched close brace/bracket in column 4  
curl: (6) Could not resolve host: content\_type  
curl: (3) [globbing] unmatched brace in column 1  
curl: (3) [globbing] unmatched close brace/bracket in column 4  
curl: (6) Could not resolve host: content\_length  
curl: (3) [globbing] unmatched brace in column 1  
curl: (3) [globbing] unmatched close brace/bracket in column 4  
curl: (3) [globbing] unmatched close brace/bracket in column 1  
curl: (3) [globbing] unmatched close brace/bracket in column 1  
curl: (3) [globbing] unmatched close brace/bracket in column 1  
curl: (3) [globbing] unmatched close brace/bracket in column 1  
curl: (3) [globbing] unmatched close brace/bracket in column 1

I also tried this:

curl -XPUT 'localhost:9200/historicdata/docs/\_mapping' -d '{ "docs": {  
"properties": { "file": { "type": "attachment", "fields": { "title": {  
"store": "yes" }, "file": {"store": "yes"} } } } } }'  
{"error":"NoSuchMethodError[org.elasticsearch.index.mapper.core.TypeParsers.parseMultiField(Lorg/elasticsearch/index/mapper/core/AbstractFieldMapper$Builder;Ljava/lang/String;Lorg/elasticsearch/index/mapper/Mapper$TypeParser$ParserContext;Ljava/lang/String;Ljava/lang/Object;)V]",  
"status": 500}

When I run this curl -XPUT localhost:9200/historicdata/docs/\_mapping {  
"docs": {"properties": { "file": { "type: "attachment"}}}}  
{"error": "NullPointerException[null]", "status": 500} curl: (3) [globbing]  
unmatched brace in column1

405 Method Not Allowed
# Method Not Allowed

The requested method PUT is not allowed for the URL /index.html.

* * *
Apache/2.4.7 (Ubuntu) Server at docs Port 80 curl: (3) [globbing] unmatched brace in column 1 curl: (6) Could not resolve host: properties curl: (3) [globbing] unmatched brace in column 1 curl: (6) Could not resolve host: file curl: (3) [globbing] unmatched brace in column 1 curl: (6) Could not resolve host: type curl: (6) Could not resolve host: attachment curl: (3) [globbing] unmatched close brace/bracket in column 1 curl: (3) [globbing] unmatched close brace/bracket in column 1 curl: (3) [globbing] unmatched close brace/bracket in column 1 curl: (3) [globbing] unmatched close brace/bracket in column 1

I'm not sure what it is I deleted my index and created a new one, I don't  
have any documents in my index.

Thanks in advance!

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/852ed0a8-e1d4-4ff2-9d53-05e27d56d4b3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/852ed0a8-e1d4-4ff2-9d53-05e27d56d4b3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:28am UTC](https://discuss.elastic.co/t/mapping-with-the-mapper-attachment-plugin/22497/2 "2017-07-06T00:28:50Z")

</div>


