Skip to content

Sinha-Ujjawal/gosen

Repository files navigation

Local Search Engine in Golang

Inspired by Local Search Engine in Rust from @tsoding made a similar project in Golang.

Getting Started

go build -tags "sqlite_math_functions" -o <PROGRAM> .

Usage

Usage: <PROGRAM> <SUBCOMMAND> <FLAGS>
  SUBCOMMANDS:
    - build: for building index db on documents present in a given directory
    - query: for finding closest matching document for a given query using tf-idf
    - serve: for serving index db on web
    - help: see help

Usage of build:
  -db string
        Path of db to store the index. Supported formats: [.db, .json] (default "index.db")
  -dir string
        Directory containing the files

Usage of query:
  -db string
        Path of db to store the index. Supported formats: [.db, .json] (default "index.db")
  -query string
        Search query
  -topN uint
        Top N results to show (default 10)

Usage of serve:
  -addr string
        Address to serve the server on (default "127.0.0.1:6969")
  -db string
        Path of db to store the index. Supported formats: [.db, .json] (default "index.db")

References

  1. Stolen saxlike from @kokardy/saxlike

  2. @tsoding's Playlist "Search Engine in Rust"

  3. Stopwords taken from: https://www.ranks.nl/stopwords (Long Stopword List)

  4. Snowball Stemmer taken from: snowballstem/snowball. I have modified the generated code as per my need

Copyrights

Licensed under @MIT

About

Local Search Engine in Golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published