-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swift _geoBoundingBox implementation is missing #387
Comments
Hi @willshelley, Thank you for the issue. I'm transferring this to the integration guides repo as this is related to a missing Swift code sample( |
Hi @willshelley, usually, when there is no code sample in the documentation, there is no implementation of that feature. But I believe that in this case, is just a missing code sample. Can you try this? let searchParameters = SearchParameters(
filter: '_geoBoundingBox([45.494181, 9.179175], [45.449484, 9.214024])'
)
client.index("restaurants").search(searchParameters) { (result: Result<Searchable<Restaurant>, Swift.Error>) in
switch result {
case .success(let searchResult):
print(searchResult)
case .failure(let error):
print(error)
}
} |
Hi @brunoocasali , thanks for the quick reply. Realised I had our coordinates mixed up 😬, all worked as expected. let searchParameters = SearchParameters(
query: "",
filter: "_geoBoundingBox([45.494181, 9.179175], [45.449484, 9.214024])"
)
client.index("restaurants").search(searchParameters) { (result: Result<Searchable<Restaurant>, Swift.Error>) in
switch result {
case .success(let searchResult):
print(searchResult)
case .failure(let error):
print(error)
}
} |
Amazing, good to know! 🎉 |
We were trying to implement _geoBoundingBox filter after successfully implementing _geoRadius sort. We couldn't find any documentation for swift and currently can't get it to work. Understand that that should be an issue for the iOS-sdk.
The text was updated successfully, but these errors were encountered: