Sphinx Search Engine 0.9.7, Ruby Client API 0.3.0

Posted by Dmytro Shteflyuk on under Ruby & Rails


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



Sphinx Search EngineСвершилось! Мы все ждали обновления Sphinx, и вот наконец Andrew Aksyonoff выпустил версию 0.9.7 своего замечательного поискового движка (для тех, кто не понимает, о чем я говорю: посмотрите мои предыдущие заметки здесь и здесь).



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.



Основные новшества Sphinx включают:

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

Теперь о Sphinx Client API для Ruby. В этой версии я решил, что нехорошо иметь разные интерфейсы в разных языка (BuildExcerpts в PHP и build_excerpts в Ruby). Потому код приложений, в которых использовали версии 0.1.0 или 0.2.0 API, необходимо пересмотреть. Детали смотрите в документации.

Изменения в Sphinx Client API для Ruby:

  • Полностью синхронизирован API с версией PHP.
  • Исправлена ошибка с обработкой атрибутов в результатах запроса (спасибо shawn).
  • Исправлена ошибка с округлением временем обработки запроса (спасибо michael).
  • Библиотека покрыта на 100% спецификациями RSpec.

Вы всегда можете загрузить последнюю версию со страницы Sphinx Client API для Ruby.

Если Вы используете Sphinx в приложении на Ruby on Rails, посмотрите плагин acts_as_sphinx.


5 Responses to this entry

Subscribe to comments with RSS

said on April 13th, 2007 at 09:17 · Permalink

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.

said on April 13th, 2007 at 11:15 · Permalink

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

said on April 27th, 2007 at 17:50 · Permalink

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)
      raise NoMethodError, "undefined method '#{m}'"
said on April 27th, 2007 at 17:54 · Permalink

Good point, thank you!



could be rewritten using

self.send(m, args)
said on August 30th, 2007 at 14:50 · Permalink

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.


Comments are closed

Comments for this entry are closed for a while. If you have anything to say – use a contact form. Thank you for your patience.