npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mongodb-js/search-index-schema

v2.1.0

Published

MongoDB Atlas Search Index JSON schemas

Readme

@mongodb-js/search-index-schema

MongoDB Atlas Search Index JSON schemas.

This package provides JSON Schema definitions for MongoDB Atlas Search Indexes, including full-text search indexes and vector search indexes.

Installation

npm install @mongodb-js/search-index-schema

Package Structure

  • schema/ - source JSON schema files
  • output/ - bundled JSON schema files generated from source schemas with all $ref pointers resolved
  • variants.json - maps feature-flag combinations to the schema variant they select
  • index.js / index.d.ts - the getSchema selector that returns the right variant for a set of enabled flags

Usage

Rather than importing a schema file by path, consumers pass the set of enabled feature flags and let the package select the correct variant:

const { getSchema } = require('@mongodb-js/search-index-schema');

// Base search index schema (no feature flags enabled)
const searchSchema = getSchema('search');

// Vector search index schema with auto-embedding public preview enabled
const vectorSchema = getSchema('vectorSearch', ['autoEmbeddingPublicPreview']);

getSchema(indexType, enabledFlags) evaluates the variants for the given index type in priority order (declared in variants.json) and returns the first whose required flags are all present in enabledFlags. The base variant has no required flags and is always the fallback. Unknown flags are ignored. The returned object is the bundled schema from output/ with all $ref pointers resolved.

Schema Files

The package includes schemas for different search index types:

Search Indexes

  • search/index.json - Search index schema for use in JSON editors, which excludes metadata such as name, database, and collectionName

Vector Search Indexes

  • vectorSearch/index.json - Vector search index schema for use in JSON editors, which excludes metadata such as name, database, and collectionName

License

Apache-2.0

Links