NullPointerexception at org.elasticsearch.action.get.GetResponse.sourceAsString, closes #68
This commit is contained in:
parent
cd2090bc79
commit
fc3a805514
|
@ -107,6 +107,9 @@ public class GetResponse implements ActionResponse, Streamable, Iterable<GetFiel
|
|||
* The source of the document (as a string).
|
||||
*/
|
||||
public String sourceAsString() {
|
||||
if (source == null) {
|
||||
return null;
|
||||
}
|
||||
return Unicode.fromBytes(source);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue