It’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.
Русский
English
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.
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).
For those wanting backwards compatibility with set_server methods instead of SetServer. Use this code:
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
Good point, thank you!
BTW,
could be rewritten using
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