mirror of
https://github.com/foomo/typesense.git
synced 2025-10-16 12:45:37 +00:00
refactor: log messages
This commit is contained in:
parent
05e2881851
commit
4e7ef6b03c
@ -329,12 +329,12 @@ func (b *BaseAPI[indexDocument, returnType]) ExpertSearch(
|
||||
// Convert hit to JSON and then unmarshal into returnType
|
||||
hitJSON, err := json.Marshal(docMap)
|
||||
if err != nil {
|
||||
b.l.Warn("failed to unmarshal search result", zap.String("index", collectionName), zap.Error(err))
|
||||
b.l.Warn("failed to marshal document to JSON", zap.String("index", collectionName), zap.Error(err))
|
||||
continue
|
||||
}
|
||||
var doc returnType
|
||||
if err := json.Unmarshal(hitJSON, &doc); err != nil {
|
||||
b.l.Warn("failed to unmarshal search result", zap.String("index", collectionName), zap.Error(err))
|
||||
b.l.Warn("failed to unmarshal JSON into returnType", zap.String("index", collectionName), zap.Error(err))
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user