mardi 30 décembre 2014

How to match up Amazon CloudSearch document update error with document

Amazon CloudSearch (at least v2) provides errors and warnings like:



{
"status": "success",
"warnings": [{
"message": "Multi-valued field \"color\" has no value (near operation with index 949)"
},
{
"message": "Multi-valued field \"color_id\" has no value (near operation with index 949)"
}],
"adds": 1000,
"deletes": 0
}


where the only way to figure out which document had an issue is parsing the "near operation with index X" and plucking that index.


I've seen a post somewhere that seems to indicate it can return document_id as well, but I'm not sure where that comes from.


So my question has two parts:


1) How can CloudSearch return the document id in the error/warning message? 2) If #1 isn't possible, is the CloudSearch error/warning message index 0- or 1-based?





Aucun commentaire:

Enregistrer un commentaire