离子
一个用Ruby编写并使用Redis的搜索引擎。
离子处于无情的重构状态,直到达到可用的功能集-使用后果自负:)
用法
离子需要Redis。
require 'ion'
Ion . connect url : 'redis://127.0.0.1:6379/0'
任何ORM都可以。 只要您可以挂钩它来更新Ion的索引,就可以了。
require 'ohm/contrib'
class Album < Ohm :: Model
include Ion :: Entity
include Ohm :: Callbacks # for `after` and `before`, part of gem 'ohm-contrib'
# Say you have these fields
attribute :name
attribute :artist
#