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

Update search.md #932

Closed
wants to merge 1 commit into from
Closed

Conversation

romaincomeau
Copy link

@romaincomeau romaincomeau commented Nov 26, 2024

Getting an error when omitting the body parameter using the client's index method as per guide/search.md
Client version

romaincomeau@phoenix tests % npm list | grep opensearch
├── @opensearch-project/opensearch@2.13.0
romaincomeau@phoenix tests %

Server versions

admin@opensearch-oh-a:~ $ pkg version | grep opensearch
opensearch-2.14.0                  =
opensearch-dashboards-2.14.0       =
admin@opensearch-oh-a:~ $ uname -a
FreeBSD opensearch-oh-a 14.1-RELEASE-p5 FreeBSD 14.1-RELEASE-p5 GENERIC amd64
admin@opensearch-oh-a:~ $

ConfigurationError: Missing required parameter: body

  114 |         })
  115 |
> 116 |         await ds.client.index({ index: "movies", refresh: true })
      |                         ^
  117 |       })
  118 |       afterAll(async () => {
  119 |         await ds.client.indices.delete({ index: "movies" })

  at Client.indexApi [as index] (node_modules/@opensearch-project/opensearch/api/api/index.js:103:17)
  at Object.index (classes/tests/app_datasource_opensearch.e2e.test.js:116:25)

Description

Describe what this change achieves.

Issues Resolved

List any issues this PR will resolve, e.g. Closes [...].

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.

Getting an error when omitting the body parameter. 

   ConfigurationError: Missing required parameter: body

      114 |         })
      115 |
    > 116 |         await ds.client.index({ index: "movies", refresh: true })
          |                         ^
      117 |       })
      118 |       afterAll(async () => {
      119 |         await ds.client.indices.delete({ index: "movies" })

      at Client.indexApi [as index] (node_modules/@opensearch-project/opensearch/api/api/index.js:103:17)
      at Object.index (classes/tests/app_datasource_opensearch.e2e.test.js:116:25)

Signed-off-by: romaincomeau <92224046+romaincomeau@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

1 participant