|
From: Masafumi Y. <yok...@cl...> - 2016-03-13 08:19:10
|
Hi, Rroonga 6.0.0 has been released on March 6. It's a major upgrade for the first time in this year! Web: http://ranguba.org/#about-rroonga GitHub: https://github.com/ranguba/rroonga Here are changes since Rroonga 5.1.1: http://ranguba.org/rroonga/en/file.news.html#version-6-0-0 About Rroonga ------------- Rroonga is the Ruby bindings for Groonga. Here are two important concepts in Rroonga. 1. Providing *Ruby-ish* API to use Groonga. 2. Providing *fast* operations like Groonga. They mean that Rroonga provides easy to use API from Ruby without decreasing Groonga's speed. Install ------- % gem install rroonga Tutorial -------- There are a tutorial that uses irb: http://ranguba.org/rroonga/en/file.tutorial.html If you are a newbie for Rroonga, please try it. Topics ------ This release has a backward incompatible change for Groonga::Table#select with a number object: Disabled auto conversion to record ID from number object in condition block. The number object is treated as key not ID from this release. Because we couldn't specify Int/UInt related type key as number object. The number object was always treated as ID not key. For example: Groonga::Schema.define do |schema| schema.create_table("Users", key_type: :integer) do |table| table.short_text("name") end schema.create_table("Records", type: :array) do |table| table.reference("user", "Users") end end users = Groonga["Users"] alice = users.add(2, name: "Alice") p alice.id # => 1 bob = users.add(1, name: "Bob") p bob.id # => 2 records = Groonga["Records"] records.add(user: alice) records.add(user: bob) selected_records = records.select do |record| record.user == 1 end p selected_records.collect {|record| record.user.name} # Returns ["Alice"] in Rroonga 5.1.1 # Returns ["Bob"] in Rroonga 6.0.0 If you want to specify record ID as right hand side value in 6.0.0, you need to pass Groonga::Record: selected_records = records.select do |record| record.user == alice end Regards, -- Masafumi Yokoyama |