Redis-Search

High performance real-time search (Support Chinese), index in Redis for Rails application

中文介绍和使用说明

Demo

You can try the search feature in IMAX.im | shu.im

And there is an Example App to show you how to use redis-search.

Master Status

CI Status

Features

Requirements

Install

  1. In Rails application Gemfile

    gem 'ruby-pinyin', '0.3.0'
    gem 'redis-search', '0.9.6'
    
    $ bundle install
    

Configure

Usage

Index data to Redis

Specify Model

Redis-Search index data to Redis from your model (pass name as CLASS environment variable).

$ rake redis_search:index:model CLASS='MyModel'

Customize the batch size:

$ rake redis_search:index:model CLASS='MyModel' BATCH=100

All Models

Redis-Search all index data to Redis from app/models (or use DIR environment variabl).

$ rake redis_search:index DIR=app/models

Customize the batch size:

$ rake redis_search:index DIR=app/models BATCH=100

Documentation

Benchmark test

You can run the rake command (see Rakefile) to make test. There is my performance test result.

License