I think this can be dangerous as FieldDoc extends ScoreDoc. Lets put eg.
```
if (!scoreDoc.getClass().equals(ScoreDoc.class)) {
    throw new ElasticsearchIllegalArgumentException("This method can only be used to serialize a ScoreDoc, not a " + scoreDoc.getClass());
}
```
at the beginning of this method to make sure it is not used with a FieldDoc?