Good point! thanks
On Friday, July 11, 2014 7:46:52 PM UTC+1, Glen Smith wrote: > > Yeah, since the response is referring to your local file name, it's pretty > clear that the problem here is with curl.exe - it's obviously not sending > the file contents in your second example, it's sending the file name. > > On Friday, July 11, 2014 10:01:39 AM UTC-4, [email protected] wrote: >> >> Hi all, >> first post. Am working through the ElasticSearch Server book (packt). Not >> getting what I expect with automatic id gen. >> Using similar example from your website [1] < >> http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-index_.html> >> >> >> >> With a file go.txt (given below) I entered this >> >> curl.exe -XPOST http://localhost:9200/twitter/tweet >> <http://www.google.com/url?q=http%3A%2F%2Flocalhost%3A9200%2Ftwitter%2Ftweet&sa=D&sntz=1&usg=AFQjCNFaLCKB2g_jrkvN34Sh2-nui24zsw> >> >> -T go.txt >> >> got back this >> >> {"_index":"twitter","_type":" >> tweet","_id":"VJcZR33ETjC1W8LX1CnL0w","_version":1,"created":true} >> >> Ok, it works as expected, but this >> >> curl.exe -XPOST http://localhost:9200/twitter/tweet/ >> <http://www.google.com/url?q=http%3A%2F%2Flocalhost%3A9200%2Ftwitter%2Ftweet%2F&sa=D&sntz=1&usg=AFQjCNH-yzen07NdyF7mdRiqZbHIfrKv4w> >> >> -T go.txt >> >> failed: >> >> >> {"_index":"twitter","_type":"tweet","_id":"go.txt","_version":6,"created":false} >> >> Only difference is the trailing backslash on the URL. >> FYI contents of go.txt is straight off your website [1] >> >> --- >> { >> "user" : "kimchy", >> "post_date" : "2009-11-15T14:12:12", >> "message" : "trying out Elasticsearch" >> } >> --- >> >> Even [1] shows a trailing forward slash used, and it apparently succeeds. >> >> Furthermore, only found this when it failed with a forwardslash (ie: >> curl.exe -XPOST http://localhost:9200/twitter/tweet/ >> <http://www.google.com/url?q=http%3A%2F%2Flocalhost%3A9200%2Ftwitter%2Ftweet%2F&sa=D&sntz=1&usg=AFQjCNH-yzen07NdyF7mdRiqZbHIfrKv4w> >> >> -T go.txt), I added "?pretty" for readability (ie: curl.exe -XPOST >> http://localhost:9200/twitter/tweet/ >> <http://www.google.com/url?q=http%3A%2F%2Flocalhost%3A9200%2Ftwitter%2Ftweet%2F&sa=D&sntz=1&usg=AFQjCNH-yzen07NdyF7mdRiqZbHIfrKv4w>?pretty >> >> -T go.txt) and it succeeded! Which I'm sure it shouldn't do. >> >> Machine is windows server 2008 R2 (64-bit), curl is 7.33.0, java is >> 1.7.0.55. Everything is being run locally, single node etc. Really basic. >> Used a file as embedding the contents in-line is a bit scrappy in windows. >> >> Need more info? can anyone reproduce? >> >> thanks >> >> jan >> > -- 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/77c26830-5649-49b8-8c06-5ee732c85555%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
