You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@ocap/indexdb-elasticsearch

Package Overview
Dependencies
Maintainers
3
Versions
517
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ocap/indexdb-elasticsearch

OCAP indexdb adapter that uses elasticsearch as backend

1.21.0
latest
Source
npmnpm
Version published
Weekly downloads
208
52.94%
Maintainers
3
Weekly downloads
 
Created
Source

@ocap/indexdb-elasticsearch

styled with prettier

OCAP indexdb adapter that stores data in elasticsearch

Install

npm install @ocap/indexdb-elasticsearch
// or
pnpm install @ocap/indexdb-elasticsearch

Usage

const ESIndexDB = require('@ocap/indexdb-elasticsearch');

const indexdb = new ESIndexDB({
  tokenLength: 28,
  endpoint: process.env.ES_ENDPOINT,
  auth:
    process.env.ES_USERNAME && process.env.ES_PASSWORD
      ? {
          username: process.env.ES_USERNAME,
          password: process.env.ES_PASSWORD,
        }
      : null,
  prefix: 'dev',
  requestTimeout: 30000,
});

If you run this in production please set ES_SHARD_COUNT and ES_REPLICA_COUNT properly to achieve better reliability and performance

Run test

Create a file: indexdb/elasticsearch/.env.test, and input:

ES_ENDPOINT=<elasticsearch endpoint>
ES_USERNAME=<elasticsearch username>
ES_PASSWORD=<elasticsearch password>

Keywords

ocap

FAQs

Package last updated on 16 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts