In this example: curl -XPUT 'http://localhost:9200/historicdata/?pretty=1' -d '{"mappings" : {docs" : {"properties" : {"file" : {"type" : "attachment", "fields" : {"file" : {"index" : "no"}, "title" : {"store" : "yes"}}}}}}}'
docs" should be "docs". For the first curl a bracket is missing. Check your JSON with SENSE or here for example: http://jsonformatter.curiousconcept.com/ David > Le 3 mars 2015 à 22:37, Austin Harmon <[email protected]> a écrit : > > Hello, > > Here is the curl command I am trying to run: > 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} > I also tried this: > curl -XPUT 'localhost:9200/historicdata/docs/_mapping' -d '{"mappings" : > {"docs" : {"properties" : {"file" : {"type" : "attachment", "fields" : > {"title" : {"store" : "yes"}, "file" : {"store" : "yes"}}}}}}}}' > {"error":"MapperParsingException[Root type mapping not empty after parsing! > Remaining fields: [mappings : {docs={properties={file={type=attachment, > fields={title={store=yes}, file={store=yes}}}}}}]]","status":400} > > Has anyone seen this before when using multiple fields. When I run this > command it works: > curl -XPUT 'http://localhost:9200/historicdata/?pretty=1' -d '{"mappings" : > {"docs" : {"properties" : {"file" : {"type" : "attachment"} } } } }' > > I've tried this: > curl -XPUT 'http://localhost:9200/historicdata/?pretty=1' -d '{"mappings" : > {docs" : {"properties" : {"file" : {"type" : "attachment", "fields" : {"file" > : {"index" : "no"}, "title" : {"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} > > I am using attachment mapper version 2.4.3 with elasticsearch 1.3.2 > > Thanks, > Austin Harmon > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/7f7dbcf6-2ce5-478f-9bb0-0a890fd6c765%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/AEF3F0EE-A56A-42B5-AC6C-D60245C80C7B%40pilato.fr. For more options, visit https://groups.google.com/d/optout.
