Hi folks,
I'm new to ES.
curl to get a document by ID has stopped working for me. I'm pretty sure it
used to work.
elasticsearch-0.90.1 local installation on my Mac. All default
configurations.
I have a document type called "campaign". To start with, I used a (minimal)
mapping:
"campaign" : {
"_id" : {
"path" : "id"
},
"properties" : {
"lastUpdateTime" : {"type" : "long", "store" : "yes",
"index" : "not_analyzed", "index_name" : "last_update_ts"}
}
}
Note that I use the "id" field in the JSON doc as the doc ID. I then use
the Java API to index JSON documents by calling
"IndexRequestBuilder.setSource".
If I do a blank search:
curl -XGET localhost:9200/11009/campaign/_search?pretty
I got a list of the docs I have indexed. For example (Note: the actual
source is much more complex):
{
"took" : 4,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 32,
"max_score" : 1.0,
"hits" : [ {
"_index" : "11009",
"_type" : "campaign",
"_id" : "519c12fee4b0efe5ddccf586",
"_score" : 1.0, "_source" : {"id":"519c12fee4b0efe5ddccf586",
"schemaVersion":1,"createTime":1369182974587,"lastUpdateTime":1369197100571,
"status":"ACTIVE"}
},
...
All looked good until I do a curl using the doc's _id:
curl -XGET localhost:9200/11009/campaign/519c12fee4b0efe5ddccf586?pretty
and I got
{
"_index" : "11009",
"_type" : "campaign",
"_id" : "519c12fee4b0efe5ddccf586",
"exists" : false
}
So that's really weird. Even more strangely, I index a simple document
through curl:
curl -XPOST localhost:9200/11009/campaign/ -d
'{"id":"xyz","schemaVersion":1,"createTime":1369182974587,"lastUpdateTime":1369197100571,"status":"ACTIVE"}}'
I can actually get the doc by
curl -XGET localhost:9200/11009/campaign/xyz
I have tried flush, refresh and restart the ES server. But it is still not
working.
Could anybody shed some lights on this problem?
Thanks,
James
--
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.
For more options, visit https://groups.google.com/groups/opt_out.