[Groonga-commit] ranguba/groonga-client-rails at 31288b3 [master] Support index for reference column

Zurück zum Archiv-Index

Kouhei Sutou null+****@clear*****
Thu Dec 22 10:52:41 JST 2016


Kouhei Sutou	2016-12-22 10:52:41 +0900 (Thu, 22 Dec 2016)

  New Revision: 31288b3ee1d9505434034e8d1493beb36d973ef6
  https://github.com/ranguba/groonga-client-rails/commit/31288b3ee1d9505434034e8d1493beb36d973ef6

  Message:
    Support index for reference column

  Modified files:
    lib/groonga/client/searcher/schema_synchronizer.rb

  Modified: lib/groonga/client/searcher/schema_synchronizer.rb (+6 -2)
===================================================================
--- lib/groonga/client/searcher/schema_synchronizer.rb    2016-12-22 00:32:54 +0900 (832078d)
+++ lib/groonga/client/searcher/schema_synchronizer.rb    2016-12-22 10:52:41 +0900 (8a20768)
@@ -87,7 +87,11 @@ module Groonga
 
         def sync_column_index(column, current_column)
           if column.have_index?
-            lexicon_name = generate_lexicon_name(column)
+            if column.reference?
+              lexicon_name = generate_reference_table_name(column)
+            else
+              lexicon_name = generate_lexicon_name(column)
+            end
             index_column_name = "index"
             if current_column
               indexes = current_column.indexes
@@ -97,7 +101,7 @@ module Groonga
             indexes.each do |index|
               return if index.full_name == "#{lexicon_name}.#{index_column_name}"
             end
-            sync_lexicon(column, lexicon_name)
+            sync_lexicon(column, lexicon_name) unless column.reference?
             create_index_column(column, lexicon_name, index_column_name)
           else
             remove_indexes(current_column)
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index