I'm having problems understanding where I'm going wrong. I've set up a
simple ES cluster and I am able to insert data fairly quickly using a
simple program.
I would like to be able to define a unique constraint (ID Field) on the
data and use it to remove remove any true duplicates which are duplicated
across all fields. If I can use an ID column that I provide, I would be
able to re-add a range of data knowing I had not created any duplicates.
It kind of sounded like the ID field does that, but it isn't clear from the
documentation.
Following the ES web page suggestion, I added the following...
http://www.elasticsearch.org/guide/reference/mapping/id-field/
When running the below script, I get an error about the provided ID not
matching the content one.
What am I doing wrong?
curl -XPOST
'http://localhost:9200/log20130207/webservicebolcalls?replication=async' -d
'{
"_id": {
"type": "string",
"index": "not_analyzed",
"store" : "yes"
}
}
'
#log20130116
#curl -XPOST
'http://internal-cabinlb-279349935.us-east-1.elb.amazonaws.com:9200/log20130207/webservicebolcalls?replication=async?op_type=create'
-d '{
curl -XPOST
'http://localhost:9200/log20130207/webservicebolcalls?replication=async' -d
'{
"_timestamp":"1/16/2013 2:03:07 AM",
"_id":"2171985207026",
"Milliseconds":"720",
"MessageId":"e242134d-15b4-46e9-be88-61c96f97a797",
"Direction":"Outbound",
"Webid":"",
"Token":"",
"ErrorCode":"0",
"MessageText":"|results|",
"StackTrace":"",
"Client":"10.3.44.1",
"ClientId":"",
"EmployeeId":""
}
'
#{"ok":true,"_index":"log20130207","_type":"webservicebolcalls","_id":"UE6H-LrARnmqF_JBC5LPkw","_version":1}
#{"error":"MapperParsingException[Failed to parse [_id]]; nested:
MapperParsingException[Provided id [TPGerHo3QLKz3jx1UXR09g] does not match
the content one [2171985207026]]; ","status":400}
--
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.