Yea. Thanks. As you suggested, I bypassed the JS API and just did an HTTP call. That worked. Thanks.
On Wednesday, March 25, 2015 at 2:51:47 AM UTC-5, Boaz Leskes wrote: > > Hi Blake, > > I'm not an expert in the JS client, but the bulk requests are meant for > indexing data. If you want to set the mapping you can do it in index > creation time or by using the dedicate put mapping API ( > http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html > > ). > > Cheers, > Boaz > > On Tuesday, March 24, 2015 at 4:06:09 PM UTC+1, Blake McBride wrote: >> >> I am attempting to define a mapping. I am first creating a new index by >> adding a document that doesn't contain anything specified in my >> mapping/schema. I am using a bulk operation to set the mapping but I get >> an ActionRequestValidationException error each time. Here is my JS code: >> >> var mappings = { >> "body": [ >> { "mappings": { >> "component": { >> "properties": { >> "classifications": { >> "type": "string", >> "index": "not_analyzed" >> } >> } >> } >> }} >> ] >> }; >> client.bulk(mappings, function(err, resp){ >> // error appears here >> }); >> >> >> The exact message I get is: ActionRequestValidationException[Validation >> Failed: 1: no requests added;] >> >> >> Any help would sure be appreciated. >> >> >> Blake McBride >> >> >> -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/9b829078-fd15-4c3a-b356-bcacd429a7bb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.