OedipusSphinx 的 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]
)评论
