[Groonga-commit] groonga/groonga at d835d45 [master] mrb: support estimating size for "reference_column == record_id"

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Apr 28 15:25:16 JST 2015


Kouhei Sutou	2015-04-28 15:25:16 +0900 (Tue, 28 Apr 2015)

  New Revision: d835d45a0c418322cdbadeb4bfba319eece84fc3
  https://github.com/groonga/groonga/commit/d835d45a0c418322cdbadeb4bfba319eece84fc3

  Message:
    mrb: support estimating size for "reference_column == record_id"

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

  Modified: lib/mrb/scripts/expression_size_estimator.rb (+6 -1)
===================================================================
--- lib/mrb/scripts/expression_size_estimator.rb    2015-04-28 15:24:59 +0900 (73b44ca)
+++ lib/mrb/scripts/expression_size_estimator.rb    2015-04-28 15:25:16 +0900 (28b80fc)
@@ -99,7 +99,12 @@ module Groonga
 
     def estimate_equal(data, index_column)
       lexicon = index_column.lexicon
-      term_id = lexicon[data.query]
+      query = data.query
+      if query.domain == lexicon.id
+        term_id = query.value
+      else
+        term_id = lexicon[query]
+      end
       return 0 if term_id.nil?
 
       index_column.estimate_size(:term_id => term_id)
-------------- next part --------------
HTML����������������������������...
Descargar 



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