[Groonga-commit] groonga/groonga at 8a6e47a [master] mrb: Table#[] always returns ID not Record

Back to archive index

Kouhei Sutou null+****@clear*****
Tue May 22 18:31:54 JST 2018


Kouhei Sutou	2018-05-22 18:31:54 +0900 (Tue, 22 May 2018)

  New Revision: 8a6e47af7f7be78dc966cba14ae18f8130675c64
  https://github.com/groonga/groonga/commit/8a6e47af7f7be78dc966cba14ae18f8130675c64

  Message:
    mrb: Table#[] always returns ID not Record
    
    It may be better that we return Record instead of ID.

  Modified files:
    lib/mrb/scripts/scan_info_data_size_estimator.rb

  Modified: lib/mrb/scripts/scan_info_data_size_estimator.rb (+5 -4)
===================================================================
--- lib/mrb/scripts/scan_info_data_size_estimator.rb    2018-05-22 18:01:35 +0900 (6079c594f)
+++ lib/mrb/scripts/scan_info_data_size_estimator.rb    2018-05-22 18:31:54 +0900 (ec936f695)
@@ -88,12 +88,13 @@ module Groonga
         lexicon = index_column.lexicon
         if query.domain == lexicon.id
           term = query.value
+          return 0 if term.nil?
+          index_column.estimate_size(:term => term)
         else
-          term = lexicon[query]
+          term_id = lexicon[query]
+          return 0 if term_id.nil?
+          index_column.estimate_size(:term_id => term_id)
         end
-        return 0 if term.nil?
-
-        index_column.estimate_size(:term => term)
       end
     end
 
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180522/0c1905f9/attachment-0001.htm 



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