Oedipus - Sphinx 的 Ruby 开发包


MIT
跨平台
Ruby

软件简介

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

示例代码:

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]
)