Code Monkey home page Code Monkey logo

facets's Introduction

Facets monorepo

It is the monorepo repository:

Facets is a client-side (though you can run it on the server) faceted search engine.

Facet - any of the definable aspects that make up a subject (as of contemplation) or an object (as of consideration)

Facets main purpose is to do the faceting aspect of the search. Text search is outsourced to other libraries, for example, you can use:

The main secret ingredient is TypedFastBitSet.js - a fast set data structure. Using it and standard Map allows us to build an inverted-index data structure. From there, it's a pretty straightforward implementation.

Demo

Netlify Status

It is easier to show than explain. See online demo here.

Is it ready for production?

The demo works, as you can see, but beyond that, there was no exhaustive testing. There are still rough edges. API can change.

Backstory

The library inspired by ItemsJS. There are only three solutions that do faceted searches on the client-side:

  • Tanstack table. It is not a primary purpose of the library, though it's possible
  • Orama. It is quite slow in my testing
  • ItemsJS

Read my article for details.

Initially, I wanted to fork ItemsJS, but I thought - it would be easier to write a library from scratch.

Warning

Appearantly pagefind also supports faceted search and loading data from json. I found out it only after implemented this library.

See:

Development

pnpm i
pnpm run dev

Logo

Logo by Pravin Unagar from Noun Project (CC BY 3.0)

TODO

  • prettier, eslint

facets's People

Contributors

dependabot[bot] avatar stereobooster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

facets's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.