Git Product home page Git Product logo

ru201's Introduction

Redis University RU201, RediSearch

Course Retired

This course has been retired, and replaced with RU203, Querying, Indexing, and Full-Text Search. Sign up for RU203.


Introduction

This repo contains the sample data and Node.js load script for RU201, RediSearch at Redis University.

Setup

Redis

Node.js

To install the script that loads the sample data into RediSearch, you'll need npm and Node.js 8.11+. To get the dependencies use:

$ npm install

in this directory.

Configuration

First, you will need to create a simple JSON file for your connection credentials. This connection file is based on the node_redis config object allowing you specify host, password, port, etc. In the most basic configuration you would have just these:

{
  "host"  : "localhost",
  "port"  : 6379
}

Remember: don't commit your copy of this file to your fork of this repo if it contains sensitive credentials.

Running

The index.js script will create the schema and database for you from a CSV file (provided).

When running you'll need to specify:

  • source Required. The CSV file which will be ingested. General_Building_Permits.csv is included
  • connection Required. The path to your configuration file.
  • drop Optional. This will drop the existing permits schema.
  • totaldocs Optional. This will give you an accurate progress bar. The provided CSV has 121,828 docs

Example:

$ node index.js --source ./General_Building_Permits.csv --connection ./connection.json --drop --totaldocs 121828

The output should look something like this:

Created index. Starting ingest.
Ingested: 121828 documents.
Ingested 121828 documents in 15 seconds. Average rate 8122 docs/sec.

Confirmation

You can check you have the right data by trying the following search from the redis-cli

127.0.0.1:6379> ft.search permits garage limit 0 0
1) (integer) 49488

Data

The data file provided (General_Building_Permits.csv) is pulled from the Edmonton Open Data Portal and is the General Building Permits dataset pulled on May 16, 2018. This dataset is frequently updated, however we've frozen the data set in this course to provided a consistent course experience.

Subscribe to our YouTube Channel

We'd love for you to check out our YouTube channel, and subscribe if you want to see more Redis videos!

ru201's People

Contributors

simonprickett avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

shannonwho

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.