-
Notifications
You must be signed in to change notification settings - Fork 123
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
feat: added sample script for multisearch #657
feat: added sample script for multisearch #657
Conversation
Signed-off-by: tejeshreddy <[email protected]>
Signed-off-by: tejeshreddy <[email protected]>
Signed-off-by: tejeshreddy <[email protected]>
Signed-off-by: tejeshreddy <[email protected]>
Signed-off-by: tejeshreddy <[email protected]>
Signed-off-by: Tejesh Reddy <[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.
The CHANGELOG link needs fixing, for the rest I think they are should have's.
guides/msearch.md
Outdated
@@ -0,0 +1,63 @@ | |||
# Multi-Search (msearch) | |||
|
|||
OpenSearch's Multi-Search (`msearch`) API is a tool that allows you to execute multiple search operations for documents within an index efficiently. This API supports various parameters that provide flexibility in customizing your search operations. It's crucial to understand the key differences between `msearch` and a regular `search` operation in OpenSearch. Unlike a single search operation, `msearch` enables you to perform multiple searches in a single API call, significantly reducing network overhead as it need not initialize a new network connection for each search. This proves particularly advantageous for batch operations or scenarios where searches span multiple indices. By combining searches into one request, `msearch` streamlines the process and enhances overall efficiency. Explore the functionalities of the msearch API with the provided sample code in [../samples/msearch.js](../samples/msearch.js). |
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.
"is a tool that allows you to" -> "allows you to", it's an API, not a tool :)
I'd be curious to hear what the downsides of msearch are. For example, does msearch require the caller to examine errors themselves?
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.
I'd be curious to hear what the downsides of msearch are. For example, does msearch require the caller to examine errors themselves?
@dblock did you mean to say this could be one of the disadvantages? I will include a couple of cons related to msearch
in comparison to search
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.
Yep
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.
I have added a con I came across when reading about the difference in both.
does msearch require the caller to examine errors themselves?
For the above point, I wasn't able to find anything substantial. It would be great if you could link doc/resources so I can add it to the guide.
guides/msearch.md
Outdated
); | ||
``` |
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.
It's not clear to me what happens in case of errors? Does the user have to handle that, and if so how? I think the sample should explicitly call it out.
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.
I have added a try-catch block in the code snippet. Please let me know if there is anything else you're referring to here.
Signed-off-by: tejeshreddy <[email protected]>
Signed-off-by: tejeshreddy <[email protected]>
Signed-off-by: tejeshreddy <[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.
Looks good. Link the guide from USER_GUIDE?
Signed-off-by: tejeshreddy <[email protected]>
Description
msearch
undersamples/msearch.js
msearch
underguides/msearch.md
Issues Resolved
#634
Check List
yarn run lint
doesn't show any errorsBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.