【文件属性】:
文件名称:ion:[不推荐使用] RubyRedis搜索引擎
文件大小:34KB
文件格式:ZIP
更新时间:2021-05-19 21:13:24
Ruby
离子
一个用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
#
【文件预览】:
ion-master
----HISTORY.md(1KB)
----Rakefile(2KB)
----test()
--------benchmark()
--------test_helper.rb(1KB)
--------unit()
--------irb_helpers.rb(98B)
--------common_helper.rb(360B)
--------p_helper.rb(808B)
--------benchmark_helper.rb(1KB)
--------redis_debug.rb(133B)
--------benchmark_notes.txt(2KB)
----ion.gemspec(802B)
----TODO.md(616B)
----Gemfile(86B)
----.gems(136B)
----.gitignore(145B)
----lib()
--------ion.rb(2KB)
--------ion()
----README.md(10KB)