-
Notifications
You must be signed in to change notification settings - Fork 90
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
Add ability to abort search request #636
Conversation
Hey @neupauer, thanks so much for these great contributions. A few questions. I see that you changed the config type with
|
Hi @bidoubiwa, thanks for the feedback. The reason for the Example: client.getIndex("movies").search("query", {}, method, {
// only part of Request interface, e.g., signal
signal: controller.signal,
}) Example without client.getIndex("movies").search("query", {}, method, {
// the whole interface is required
cache,
credentials,
destination,
headers,
signal,
//...
})
More information can be found at: Typescript | Utility Types |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for your great answers!
Could you add a test that does two searches in the following scenario
- make a search A
- make a search B
- abord A
- check if B is successful and A has been aborted
@bidoubiwa Yes, sure, I updated the tests and also add some notes to the README.md Note: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🔥 Just asking a second eye on this to be sure @curquiza
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small change in the README, otherwise, it's perfect 😁 Thanks for this really clear PR!
Signed-off-by: Peter Neupauer <[email protected]>
Signed-off-by: Peter Neupauer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thanks again!!
bors merge |
Build succeeded: |
This PR adds the ability to insert additional config into the search request, e.g.,
signal
to abort the request.Resolve #630