Docs
  • Guides
  • APIs (opens in a new tab)
  • Products
    Elasticsearch Observability Security Elastic Cloud
  • Reference
  • Troubleshoot
  • Release notes
  1. Docs /
  2. Reference /
  3. Elasticsearch /
  4. Clients /
  5. JavaScript

Examples

Following you can find some examples on how to use the client.

  • Use of the asStream parameter;
  • Executing a bulk request;
  • Executing a bulk request with base64-encoded vectors;
  • Executing a exists request;
  • Executing a get request;
  • Executing a sql.query request;
  • Executing a update request;
  • Executing a update by query request;
  • Executing a reindex request;
  • Use of the ignore parameter;
  • Executing a msearch request;
  • How do I scroll?
  • Executing a search request;
  • I need suggestions;
  • How to use the transport.request method;
Previous
API Reference
Next
asStream
  • View as Markdown
  • Report a docs issue
  • Edit this page
  • Learn how to contribute
Get started free
  • 14-day free trial
  • All features included
  • No setup required
Section
Reference
Docs Guides APIs (opens in a new tab)
Products
Elasticsearch Observability Security Elastic Cloud
Reference Troubleshoot Release notes
Version
Reference Elasticsearch Clients
  • JavaScript
    • Getting started
    • Installation
    • Connecting
    • Configuration
      • Basic configuration
      • Advanced configuration
      • Creating a child client
      • Testing
    • Integrations
      • Observability
      • Transport
      • TypeScript support
    • API Reference
    • Examples
      • asStream
      • Bulk
      • Exists
      • Get
      • Ignore
      • MSearch
      • Scroll
      • Search
      • Suggest
      • transport.request
      • SQL
      • Update
      • Update By Query
      • Reindex
    • Client helpers
    • Timeout best practices
Elastic logo
  • Trademarks
  • Terms of Use
  • Privacy
  • Sitemap

© 2026 Elasticsearch B.V. All Rights Reserved.

This content is available in different formats for convenience only. All original licensing terms apply.

Elasticsearch is a trademark of Elasticsearch B.V., registered in the U.S. and in other countries. Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.