diff --git a/redisearch/document.go b/redisearch/document.go index c45e461..f5b6d95 100644 --- a/redisearch/document.go +++ b/redisearch/document.go @@ -105,8 +105,9 @@ func loadDocument(arr []interface{}, idIdx, scoreIdx, payloadIdx, fieldsIdx int) } if fieldsIdx > 0 { - lst := arr[idIdx+fieldsIdx].([]interface{}) - doc.loadFields(lst) + if lst, ok := arr[idIdx+fieldsIdx].([]interface{}); ok { + doc.loadFields(lst) + } } return doc, nil