[Groonga-commit] droonga/droonga-engine at 5936f7d [master] Output search results with vector reference column values correctly

Back to archive index

YUKI Hiroshi null+****@clear*****
Tue Jul 15 19:20:57 JST 2014


YUKI Hiroshi	2014-07-15 19:20:57 +0900 (Tue, 15 Jul 2014)

  New Revision: 5936f7dbe576cb3974606a88a5346fb0df79bae9
  https://github.com/droonga/droonga-engine/commit/5936f7dbe576cb3974606a88a5346fb0df79bae9

  Message:
    Output search results with vector reference column values correctly

  Modified files:
    lib/droonga/searcher.rb

  Modified: lib/droonga/searcher.rb (+14 -5)
===================================================================
--- lib/droonga/searcher.rb    2014-07-02 10:06:38 +0900 (1b613e6)
+++ lib/droonga/searcher.rb    2014-07-15 19:20:57 +0900 (68ff4cc)
@@ -548,15 +548,24 @@ module Droonga
             expression.execute
           else
             value = record[attribute[:source]]
-            if value.is_a?(Groonga::Record)
-              value.record_id
-            else
-              value
-            end
+            one_record_value(value)
           end
         end
       end
 
+      def one_record_value(value)
+        case value
+        when Groonga::Record
+          value.record_id
+        when Array
+          value.collect do |one_value|
+            one_record_value(value)
+          end
+        else
+          value
+        end
+      end
+
       def format(output_target_attributes, records, output_limit, output_offset)
         cursor_options = {
           :offset => output_offset,
-------------- next part --------------
HTML����������������������������...
下載 



More information about the Groonga-commit mailing list
Back to archive index