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

strapi-plugin-tantivy

v1.0.3

Published

Tantivy Search Plugin for Strapi

Readme

npm version License: MIT


Strapi Plugin Tantivy bridges the gap between Strapi and Tantivy (via node-tantivy-binding), providing an incredibly fast, highly scalable, full-text search engine natively integrated into your Strapi backend.

Forget complex external setups like Elasticsearch or Algolia—get lightning-fast search capabilities directly within your Node.js infrastructure.

✨ Features

  • ⚡️ Blazing Fast: Powered by Rust-based Tantivy, indexing and querying are orders of magnitude faster than traditional SQL wildcard searches.
  • 🔄 Auto-Sync: Automatically intercepts and indexes content creation, updates, and deletions in Strapi.
  • 🗄 Zero External Dependencies: Runs entirely within your Node.js process using native bindings. No need for a separate search server.
  • ⚙️ Configurable: Choose exactly which collections to index.
  • 🚀 Redis Cache Ready: Built-in support for caching queries in Redis for even faster subsequent reads.
  • 🛡 Admin Dashboard: Easily view and manage the indexing status directly from your Strapi Admin UI.

📦 Installation

To install this plugin, run the following command in your Strapi project:

npm install strapi-plugin-tantivy
# or
yarn add strapi-plugin-tantivy

🚀 Configuration

Enable and configure the plugin in your config/plugins.js (or config/plugins.ts) file.

module.exports = ({ env }) => ({
  // ... your other plugins
  
  'strapi-plugin-tantivy': {
    enabled: true,
    config: {
      // Enable or disable Redis caching for search queries
      redisCache: true,
      
      // List the Content-Type UIDs of the collections you want to index
      collections: [
        'api::device.device', 
        'api::vendor.vendor', 
        'api::app.app', 
        'api::product.product'
      ]
    }
  }
});

💡 How It Works

Once configured, the plugin performs the following tasks:

  1. Initialization: On Strapi startup, it verifies the Tantivy index directories.
  2. Lifecycle Hooks: It dynamically attaches to the afterCreate, afterUpdate, and afterDelete hooks of the collections specified in your configuration.
  3. Indexing: Any time a document is modified in Strapi, it is instantly synchronized into the local Tantivy index (stored in temp/ or data/).
  4. Querying: You can hit the search endpoints via the plugin's exposed controllers (e.g., /api/search) to retrieve fast, semantically ranked search results.

🛠 Usage in API

You can trigger a search via the Strapi API by leveraging the plugin's services. Assuming you expose a custom controller:

const { data } = await strapi.plugin('strapi-plugin-tantivy').service('tantivy').search(query, collectionUid);

(Note: Ensure you have built out a custom route/controller or are using the one exposed natively by the plugin!)

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

  1. Clone this repository.
  2. Run npm install.
  3. Create your feature branch (git checkout -b feature/amazing-feature).
  4. Commit your changes (git commit -m 'Add some amazing feature').
  5. Push to the branch (git push origin feature/amazing-feature).
  6. Open a Pull Request.

📝 License

This project is licensed under the MIT License.