Yes. It looks ok.
I suspect something wrong with your curl command under cygwin.
I suppose that your use case is to use ES with another language than curl ???
May be, you can try to run your code from elsewhere than cygwin (jvm, PHP, ...). I suppose that you will use in production a real UNIX box?
May I suggest that you try to use your target machine or your target platform (JVM, ...) ?
--
David ![]()
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 19 oct. 2012 à 10:21, cocowalla colin.anderson333@googlemail.com a écrit :
OK, I've now tried it with your json file, and still get the same results ![]()
Here is the mapping (which looks OK, AFAICS):
$ curl -XGET 'http://localhost:9200/test/_mapping?pretty=1'
{
"test" : {
"default" : {
"_all" : {
"enabled" : false
},
"properties" : { }
},
"attachment" : {
"_all" : {
"enabled" : false
},
"properties" : {
"file" : {
"type" : "attachment",
"path" : "full",
"fields" : {
"file" : {
"type" : "string",
"store" : "yes",
"term_vector" : "with_positions_offsets"
},
"author" : {
"type" : "string"
},
"title" : {
"type" : "string",
"store" : "yes"
},
"name" : {
"type" : "string"
},
"date" : {
"type" : "date",
"format" : "dateOptionalTime"
},
"keywords" : {
"type" : "string"
},
"content_type" : {
"type" : "string"
}
}
}
}
}
}
}
On Thursday, October 18, 2012 7:33:16 PM UTC+1, David Pilato wrote:
I have seen that once. The common error is that you don’t start with a clean index and mapping definition.
You should check that your mapping is the right one. Elasticsearch Platform — Find real-time answers at scale | Elastic
If your field is analyzed as a String, it won’t work.
HTH
David.
--
--