Skip to content
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

Query parameter: minimumAroundRadius #23

Closed
ElPicador opened this issue Apr 7, 2016 · 7 comments
Closed

Query parameter: minimumAroundRadius #23

ElPicador opened this issue Apr 7, 2016 · 7 comments

Comments

@ElPicador
Copy link

The parameter minimumAroundRadius can not be set in the Query

@clement-leprovost
Copy link
Contributor

Already implemented in the v3 branch... of the Swift client. No plan to implement it in the Objective-C client so far, as the Swift client will be preferred as of v3.

@clement-leprovost
Copy link
Contributor

Superseded by #25.

@sharad1404
Copy link

Our entire implementation is in obj-c. We have a need to set minimumAroundRadius, but we are stuck as we are not finding any docs to set this in obj-c. Can you please help guide us how to set this in obj-c.

@redox
Copy link
Contributor

redox commented Jun 14, 2016

Our entire implementation is in obj-c. We have a need to set minimumAroundRadius, but we are stuck as we are not finding any docs to set this in obj-c. Can you please help guide us how to set this in obj-c.

Hey @sharad1404,

you can still use the arbitrary query parameters available in our Objective-C API client:

ASQuery* query = [[ASQuery alloc] init];
[query set:@"minimumAroundRadius" value:@"100000"];

You may need to upgrade to the latest version however :)

@sharad1404
Copy link

Thanks Sylvain for the quick response. Will try this right away and let you
know if there are any questions.

thanks,
Sharad

On Tue, Jun 14, 2016 at 11:29 AM, Sylvain Utard notifications@github.com
wrote:

Our entire implementation is in obj-c. We have a need to set
minimumAroundRadius, but we are stuck as we are not finding any docs to set
this in obj-c. Can you please help guide us how to set this in obj-c.

Hey @sharad1404 https://github.com/sharad1404,

you can still use the arbitrary query parameters available in our
Objective-C API client:

ASQuery* query = [[ASQuery alloc] init];
[query set:@"minimumAroundRadius" value:@"100000"];

You may need to upgrade to the latest version however :)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#23 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ATAzGvvgRYxwU44-df601nNwDVcOHD7Pks5qLvMegaJpZM4ICR9E
.

@sharad1404
Copy link

One follow-up question re: implementation.

We tried the arbitrary query parameters and it works fine.
However - once we set the value - it persists for all future queries. Is there a way to reset it back for queries.

@clement-leprovost
Copy link
Contributor

@sharad1404 Sorry, I am not sure to understand what you mean by "it persists for all future queries". :/

The ASRemoteIndex class does not persist the query between searches. However, if you are re-using the same ASQuery instance between searches, indeed the values will persist, but that's intentional. If you don't want this to happen, just create a new instance every time. Alternatively, you can call -[ASQuery set:value:] with a nil value, which will remove the corresponding extra parameter. (I wouldn't recommend this approach, however. Treating queries as immutable after they are constructed is in my opinion less error-prone.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants