Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flexsearch

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flexsearch

Next-Generation full text search library with zero dependencies.

  • 0.7.43
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
307K
decreased by-7.74%
Maintainers
1
Weekly downloads
 
Created

What is flexsearch?

FlexSearch is a high-performance, full-text search library for JavaScript. It is designed to be fast and efficient, providing a variety of indexing and search capabilities. FlexSearch can be used in both Node.js and browser environments, making it versatile for different types of applications.

What are flexsearch's main functionalities?

Indexing

FlexSearch allows you to create an index and add documents to it. Each document is associated with a unique ID.

const FlexSearch = require('flexsearch');
const index = new FlexSearch();
index.add(1, 'Hello World');
index.add(2, 'Hi there');

Searching

You can perform searches on the indexed documents. The search results will return the IDs of the matching documents.

index.search('Hello', function(results) {
  console.log(results); // [1]
});

Asynchronous Search

FlexSearch supports asynchronous search operations, which can be useful for handling large datasets or integrating with other asynchronous workflows.

index.search('Hello').then(function(results) {
  console.log(results); // [1]
});

Custom Configuration

FlexSearch allows for extensive customization of the indexing and search process. You can configure encoding, tokenization, threshold, and resolution to suit your specific needs.

const customIndex = new FlexSearch({
  encode: 'icase',
  tokenize: 'forward',
  threshold: 0,
  resolution: 3
});
customIndex.add(1, 'Custom configuration example');

Other packages similar to flexsearch

Keywords

FAQs

Package last updated on 10 Jan 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc