All Projects → o19s → Elastic Graph Recommender

o19s / Elastic Graph Recommender

Licence: apache-2.0
Building recommenders with Elastic Graph!

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Elastic Graph Recommender

Albedo
A recommender system for discovering GitHub repos, built with Apache Spark
Stars: ✭ 149 (+351.52%)
Mutual labels:  elasticsearch, recommender-system
Orange3 Recommendation
🍊 👎 Add-on for Orange3 to support recommender systems.
Stars: ✭ 21 (-36.36%)
Mutual labels:  recommender-system
Elasticsearch Smalltalk
Elasticsearch for Pharo Smalltalk
Stars: ✭ 9 (-72.73%)
Mutual labels:  elasticsearch
Flexsearch
Next-Generation full text search library for Browser and Node.js
Stars: ✭ 8,108 (+24469.7%)
Mutual labels:  elasticsearch
Docker Rails
Dockerize Rails 6 with ActionCable, Webpacker, Stimulus, Elasticsearch, Sidekiq
Stars: ✭ 856 (+2493.94%)
Mutual labels:  elasticsearch
Recq
RecQ: A Python Framework for Recommender Systems (TensorFlow Based)
Stars: ✭ 883 (+2575.76%)
Mutual labels:  recommender-system
Cbir System
Content-Based Image Retrieval system (KTH DD2476 Project)
Stars: ✭ 9 (-72.73%)
Mutual labels:  elasticsearch
Rom Elasticsearch
Elasticsearch adapter for rom-rb
Stars: ✭ 30 (-9.09%)
Mutual labels:  elasticsearch
Movie Finder
오픈소스 검색엔진인 Elasticsearch 를 활용하여 '영화'를 검색을 하는 Vue.js 프로젝트
Stars: ✭ 21 (-36.36%)
Mutual labels:  elasticsearch
Apm Server
APM Server
Stars: ✭ 878 (+2560.61%)
Mutual labels:  elasticsearch
Eliot
Eliot: the logging system that tells you *why* it happened
Stars: ✭ 874 (+2548.48%)
Mutual labels:  elasticsearch
Moqui Elasticsearch
Moqui Tool Component for ElasticSearch useful for scalable faceted text search, and analytics and reporting using aggregations and other great features
Stars: ✭ 10 (-69.7%)
Mutual labels:  elasticsearch
Laravel Scout Elastic
Elastic Driver for Laravel Scout
Stars: ✭ 886 (+2584.85%)
Mutual labels:  elasticsearch
Texcavator
Text mining on the Royal Library newspaper corpus
Stars: ✭ 9 (-72.73%)
Mutual labels:  elasticsearch
Elasticsearch Java Rest
Elasticsearch Java Rest 手册
Stars: ✭ 27 (-18.18%)
Mutual labels:  elasticsearch
Wazuh Chef
Wazuh - Chef cookbooks
Stars: ✭ 9 (-72.73%)
Mutual labels:  elasticsearch
Office365 Management Api Elk
An API connector for the Office 365 Management API and the Elastic Stack
Stars: ✭ 13 (-60.61%)
Mutual labels:  elasticsearch
Angularcomponentplotly
Angular Component for Plotly, ASP.NET Core, Elasticsearch
Stars: ✭ 14 (-57.58%)
Mutual labels:  elasticsearch
Elastic data
Elasticsearch datasets ready for bulk loading
Stars: ✭ 30 (-9.09%)
Mutual labels:  elasticsearch
Hot Comment
Go、Gin、Elasticsearch开发的云音乐歌手、歌曲、评论搜索API,线上演示地址在右边:
Stars: ✭ 28 (-15.15%)
Mutual labels:  elasticsearch

Elastic Graph Recommender

Blog Post

Building recommenders with Elastic Graph! This app makes movie recommendations using Elastic graph based on the Movielens data set. Movielens is a well known open data set with user movie ratings.

We use this data alongside The Movie Database(TMDB). TMDB has all the movie details such as title, image URL, etc.

ETL and data prep

In the etl/ folder there are several Python scripts for importing movielens & TMDB data into Elasticsearch into two collections.

  • One index, movielens stores user view data. Each record is a user and the movielens identifiers of movies they liked. The primary key is a movielens user id. These documents hold a single field liked_movies -- the movielens ids of the movies this user liked.
  • Another index ml_tmdb uses the mapping from movielens ids -> tmdb ids to store details about each movies (title, poster image URL, etc). The primary key is the movielens movie id.

Import Movielens ratings

  • prepareData.sh is a shell script for downloading the latest movielens data (ml-20m) and unpacking it to the ml-20m folder.
  • ratingsToEs.py is a Python 2.7 script for importing movielens data into Elasticsearch

Import TMDB movie details

It's recommended you get the prepared source data file ml_tmdb.json from someone. But you can recreate it with the scripts below

  • tmdb.py crawls the movielens TMDB movies into tmdb.json
  • rehashTmdbToMl.py creates ml_tmdb.json, which is tmdb.json with the movielens as the primary identifier
  • indexMlTmdb.py indexes ml_tmdb.json into Elasticsearch

Angular App

The app/ folder holds an angular app for querying Elasticsearch via the graph API for recommendations.

Bootstrap app

See the app/depends.sh shell script for bootstrapping bower and npm dependencies

Run the app

Start a dumb web server in the app/ dir,

cd app/
./srv.sh

Tests

Tests are run via Karma, you can run app/test.sh to run tests. When debugging, I use the following command:

node_modules/karma/bin/karma start --no-single-run --log-level debug --auto-watch --browsers Chrome

which runs Karma in Chrome, autowatching the source files.

Deploying

By rubbing two sticks together to start a fire

  • However you like to deploy stuff, there's a script bootstrap.sh that lists the steps taken to provision an Ubuntu box with Elastic Graph. NOTE this script is meant for development purposes, it does several non-secure things like opens up Elasticsearch to the world and has very liberal CORS permissions.

By using Docker

Start the docker images via:

docker login harbor.dev.o19s.com   # ask Eric for credentials

docker run -d -p 9200:9200 -p 9300:9300 --name elasticsearch harbor.dev.o19s.com/elastic-graph-recommender/elasticsearch:latest
docker run -d -p 8000:8000 --name app -e ELASTICSEARCH_URL=http://localhost:9200 harbor.dev.o19s.com/elastic-graph-recommender/app:latest

If you are deploying in the cloud, remember that the ELASTICSEARCH_URL is pointing to the public URL for the Elasticsearch node, so update accordingly!

Load the demo data via:

docker exec -it elasticsearch python /etl/rehashTmdbToMl.py
docker exec -it elasticsearch python /etl/indexMlTmdb.py http://localhost:9200 /etl/ml_tmdb.json
docker exec -it elasticsearch python /etl/ratingsToEs.py http://localhost:9200 /etl/ml_tmdb.json /etl/ml-20m/ratings.csv

By using a blow torch

docker login harbor.dev.o19s.com   # ask Eric for credentials
docker-compose up

Browse to http://localhost:8000 to try it out!

Building Docker images

Build the docker images from scratch via:

docker build -t elastic-graph-recommender/elasticsearch -f deploy/elasticsearch/Dockerfile .
docker build -t elastic-graph-recommender/app -f deploy/app/Dockerfile .
docker build -t elastic-graph-recommender/init -f deploy/init/Dockerfile .

Deploy to our private Docker registry http://harbor.dev.o19s.com:

docker login harbor.dev.o19s.com

docker tag elastic-graph-recommender/elasticsearch harbor.dev.o19s.com/elastic-graph-recommender/elasticsearch
docker tag elastic-graph-recommender/app harbor.dev.o19s.com/elastic-graph-recommender/app
docker tag elastic-graph-recommender/init harbor.dev.o19s.com/elastic-graph-recommender/init

docker push harbor.dev.o19s.com/elastic-graph-recommender/elasticsearch
docker push harbor.dev.o19s.com/elastic-graph-recommender/app
docker push harbor.dev.o19s.com/elastic-graph-recommender/init
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].