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

fix typo in msearch guide (index -> indices) #740

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

weisun10
Copy link
Contributor

It causes "TypeError: client.index.refresh is not a function" when trying to run the sample codes in msearch.md.

Description

There is a typo in msearch.md.
The "client.index.refresh" in "await client.index.refresh({ index: 'movies' });" should be "client.indices.refresh" instead.

Issues Resolved

Fix a typo in msearch.md.

Check List

  • New functionality includes testing.
    • All tests pass
  • Linter check was successfull - yarn run lint doesn't show any errors
  • Commits are signed per the DCO using --signoff
  • Changelog was updated.

By 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.

It causes "TypeError: client.index.refresh is not a function" when trying to run the sample codes in msearch.md.

Signed-off-by: Wei Sun <wei.sun10@microfocus.com>
@dblock
Copy link
Member

dblock commented Mar 26, 2024

Can you please double check that the code in the guide matches the working sample in https://github.com/opensearch-project/opensearch-js/blob/main/samples/msearch.js?

@weisun10
Copy link
Contributor Author

Can you please double check that the code in the guide matches the working sample in https://github.com/opensearch-project/opensearch-js/blob/main/samples/msearch.js?

@dblock yes. The code in guide matches the msearch.js sample. It's a bit simpler but does similar client.bulk, client.indices.refresh, client.msearch and client.indices.delete.

@dblock dblock merged commit de0dc1d into opensearch-project:main Mar 26, 2024
9 of 17 checks passed
@weisun10 weisun10 deleted the fix_typo_msearch_guide branch March 27, 2024 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants