Skip to content

Commit fe4196c

Browse files
Explain hits parsing in the Readme
1 parent e4738cd commit fe4196c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ index.search(query: "jimmie") { result in
157157
print("Error: \(error)")
158158
case .success(let response):
159159
print("Response: \(response)")
160+
do {
161+
let foundContacts: [Contact] = try response.extractsHits()
162+
print("Found contacts: \(foundContacts)")
163+
} catch let error {
164+
print("Contact parsing error: \(error)")
165+
}
160166
}
161167
}
162168
```

0 commit comments

Comments
 (0)