Git Product home page Git Product logo

web-bloom's Introduction

web-bloom

A search engine embedded in your web page with the speed of a local search!

web-bloom is a proof of concept for a lightweight alternative to traditional heavy search engine. Here your request is handled locally within the web browser without going through a third party service. No calls through the Internet, no network latency and no plugin. The power of a local search engine installed directly on the computer of all your visitors!

web-bloom is designed to be fast and memory efficient at the expense of a customizable probability of false positives. It relies on index-bloom to implement a probabilistic search engine and then it is transposed into WebAssembly for execution in a web browser. An index dump can be created easily with cli-bloom and imported as a regular Json file in the browser.

Quick start

  1. Transform a dump file into importable Json object:
$ echo -e "export default $(cat dump.json)" > index_dump.js
  1. Copy your dump to the public directory:
$ mv index_dump.js public/
  1. Compile the project with wasm-pack:
$ wasm-pack build --target web --out-dir public/pkg
  1. Use a local web server (mandatory to bypass CORS restrictions):
$ docker run --rm --name web-bloom-nginx -v ${PWD}/public:/usr/share/nginx/html:ro -d -p 8080:80 nginx:1.19-alpine
  1. Go to http://localhost:8080
  2. The sample index at public/index_dump.js ingested books of William Shakespeare from the Gutenberg project. You can search words present in:
  • Hamlet
  • Julius Caesar
  • King Lear
  • Macbeth
  • Othello
  • Rome and Juliet The original source represent 968923 bytes and the optimized index is only 263643 bytes, a ~73% win!

License

web-bloom is released under the MIT license (LICENSE).

Resources

https://www.gutenberg.org/ebooks/author/65

web-bloom's People

Contributors

odespesse avatar

Stargazers

 avatar

Watchers

 avatar

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.