Sphinx Search Engine 0.9.7, Ruby Client API 0.3.0

Apr 05
2007 16:44 (Development, MySQL, RoR Plugins, Ruby on Rails) · Русский (7,102 views)

Sphinx Search EngineIt’s happened! We all waited for Sphinx update and finally Andrew Aksyonoff has released version 0.9.7 of his wonderful search engine (who does not know about it, look my previous posts here and here).

Major Sphinx updates include:

  • separate groups sorting clause in group-by mode
  • support for 1-grams, prefix and infix indexing
  • improved documentation

Now about Sphinx Client API for Ruby. In this version I decided that it is not so good to have different interfaces in different languages (BuildExcerpts in PHP and build_excerpts in Ruby). Therefor applications which using version 0.1.0 or 0.2.0 of API should be reviewed after update. Check documentation for details.

New things in the Sphinx Ruby API:

  • Completely synchronized API with PHP version.
  • Fixed bug with processing attributes in query response (thanks to shawn).
  • Fixed bug query processing time round-up (thanks to michael).
  • 100% covered by RSpec specifications.

You could always download latest version from the Sphinx Client API for Ruby page.

If you are using Sphinx in your Ruby on Rails application, you should try acts_as_sphinx plugin.

5 Responses to 'Sphinx Search Engine 0.9.7, Ruby Client API 0.3.0'

Subscribe to comments with RSS or TrackBack to 'Sphinx Search Engine 0.9.7, Ruby Client API 0.3.0'.

1
joost
said on 2007-04-13 at 9.17 am

Great! Shouldn’t this version be also on RubyForge? I saw only v0.2.0 there..

BTW. My opinion is that Ruby methods should always be of the form: object.method_call. And not object.MethodCall..
But this is just my humble opinion.

2
said on 2007-04-13 at 11.15 am

You are right about ruby code conventions. But it is more simple for us to have identical syntax for all languages. I would add more ruby-like syntax in 0.3.1 (hope on this weekend).

3
joost
said on 2007-04-27 at 5.50 pm

For those wanting backwards compatibility with set_server methods instead of SetServer. Use this code:

class Sphinx::Client
  def method_missing(m, *args)
    m = m.to_s.camelize
    if self.methods.include?(m)
      eval("#{m}(#{args})")
    else
      raise NoMethodError, "undefined method '#{m}'"
    end
  end
end
4
said on 2007-04-27 at 5.54 pm

Good point, thank you!

BTW,

eval("#{m}(#{args})")

could be rewritten using

self.send(m, args)
5
said on 2007-08-30 at 2.50 pm

Hey we just implemented it and are really really happy with it: search query duration has an average of 0,0000s on about 20.000 documents. Thats awesome.

jerk

Post a comment

You can use simple HTML-formatting tags (like <a>, <ul> and others). To format your code sample use <code lang="php">$a = "hello";</code> (allowed languages are ruby, php, yaml, html, csharp, javascript). Also you could use <code>$a = "hello";</code> and its syntax would not be highlighted. If you are not using <code> tag, replace < sign with &lt;.

Submit Comment

 
Copyright © 2005 - 2008, Dmytro Shteflyuk