https://github.com/donrestarone/rails-elasticsearch
a sample application that features elasticsearch with autocompletion/suggestion + highlights
https://github.com/donrestarone/rails-elasticsearch
Last synced: 3 months ago
JSON representation
a sample application that features elasticsearch with autocompletion/suggestion + highlights
- Host: GitHub
- URL: https://github.com/donrestarone/rails-elasticsearch
- Owner: donrestarone
- Created: 2020-06-09T01:11:10.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-08T19:17:28.000Z (over 2 years ago)
- Last Synced: 2025-02-07T21:41:58.323Z (5 months ago)
- Language: Ruby
- Homepage:
- Size: 62.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# README
## To install elastic-search on ubuntu
grab the elastic public GPG key and put it into apt
```bash
curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
```
add the elastic source```bash
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
``````bash
sudo apt update
``````bash
sudo apt install elasticsearch
```to start elastic search
```bash
sudo systemctl start elasticsearch
```## Setup the rails app
```bash
rails db:create && rails db:migrate && rails db:seed && rails s
```## What you can expect
Check out the tests for queries. Here I am verifying the behavior of word stems, misspelling, highlighting and suggestions.
With postman we see the JSON structure that is returned by the API. In this example, I misspell Wonder Woman and get a suggestion with the correct spelling
In this example, we see the highlighting feature.
