saswatamcode/search_engine

This is a search engine built using Go and Elasticsearch. Scrapes quotes from Goodreads, which are then indexed and queried. Has both CLI and frontend web app.

★ 4Forks 0GoGitHub ↗Compare
clicobraelasticsearchgolangnextjssearch-enginetailwindcss

README

License: MIT Maintenance Ask Me Anything ! made-for-VSCode GitHub forks GitHub stars GitHub issues Open Source Love svg1

Quote Search Engine

This is a search engine built using Go and Elasticsearch.

How it works

It functions by scraping quotes from Goodreads and indexing the data into elasticsearch. With elasticsearch's robust text analysis capabilities, the data can then be queried. Here, we simply query based on the content of a quote or the name of the author. This application has both CLI and web UI for search and indexing operations.

Dependencies

  • github.com/gocolly/colly v1.2.0: For web scraping
  • github.com/olivere/elastic/v7 v7.0.22: For interacting with elasticsearch
  • github.com/spf13/cobra v1.1.1: For CLI
  • github.com/sirupsen/logrus v1.2.0: For server logs
  • Next.js v10 and Tailwind v2: For frontend web app

Get Started

  • Clone into repo
  • Install elasticsearch and start service. Using homebrew simply run,
brew install elasticsearch
elasticsearch
  • Using CLI, index data by, (for indexname and number of quotes to be indexed you can pass in flags)
go run main.go index
  • Search with CLI,
go run main.go search Mark Twain

OR

  • Search with UI, by first starting server,
go run main.go server
  • Then start frontend,
cd web-ui
yarn
yarn start

forthebadge forthebadge

Contributors

saswatamcode

Issues