Sphinx 的 Ruby 开发包:Oedipus

jopen 10年前

Oedipus 是 Sphinx 搜索引擎(>2.0.2) 的 Ruby 客户端,支持实时索引和多维的 faceted 搜索。

示例代码:

sphinx[:articles].search(    "example",    attrs: [:*, "WEIGHT() AS wgt"]  )

require "oedipus"    sphinx = Oedipus.connect('127.0.0.1:9306') # sphinxql host    sphinx[:articles].insert(    7,    title:     "Badgers in the wild",    body:      "A big long wodge of text",    author_id: 4,    views:     102  )    sphinx[:articles].search(    "example",    attrs: [:id, :views]  )

项目主页:http://www.open-open.com/lib/view/home/1399509593806