I've created a custom response writer which extends RawResponseWriter. The basic operation is to output a single field value from the top matching doc as the entire response. This works when shards = 1 but fails when shards are greater than 1.
I throw an error if the field in question is missing from the top doc. This happens when individual shards are being searched and only id and score are returned. I'm sure I've committed a basic error. Lee C