[Groonga-commit] groonga/groonga at 442880c [master] mrb: (maybe) support fuzzy operator

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Feb 16 11:46:13 JST 2016


Kouhei Sutou	2016-02-16 11:46:13 +0900 (Tue, 16 Feb 2016)

  New Revision: 442880cad163ae14b4b61d60c9720eafb3111e93
  https://github.com/groonga/groonga/commit/442880cad163ae14b4b61d60c9720eafb3111e93

  Message:
    mrb: (maybe) support fuzzy operator

  Modified files:
    lib/mrb/mrb_operator.c
    lib/mrb/scripts/expression_size_estimator.rb
    lib/mrb/scripts/scan_info_builder.rb

  Modified: lib/mrb/mrb_operator.c (+1 -0)
===================================================================
--- lib/mrb/mrb_operator.c    2016-02-16 11:37:24 +0900 (2e0cb48)
+++ lib/mrb/mrb_operator.c    2016-02-16 11:46:13 +0900 (ed16a02)
@@ -148,6 +148,7 @@ grn_mrb_operator_init(grn_ctx *ctx)
   DEFINE_OPERATOR(JSON_PUT);
   DEFINE_OPERATOR(GET_MEMBER);
   DEFINE_OPERATOR(REGEXP);
+  DEFINE_OPERATOR(FUZZY);
 
 #undef DEFINE_OPERATOR
 }

  Modified: lib/mrb/scripts/expression_size_estimator.rb (+2 -1)
===================================================================
--- lib/mrb/scripts/expression_size_estimator.rb    2016-02-16 11:37:24 +0900 (c9c2604)
+++ lib/mrb/scripts/expression_size_estimator.rb    2016-02-16 11:46:13 +0900 (c883ef3)
@@ -61,7 +61,8 @@ module Groonga
 
       size = nil
       case data.op
-      when Operator::MATCH
+      when Operator::MATCH,
+           Operator::FUZZY
         size = estimate_match(data, index_column)
       when Operator::REGEXP
         size = estimate_regexp(data, index_column)

  Modified: lib/mrb/scripts/scan_info_builder.rb (+1 -0)
===================================================================
--- lib/mrb/scripts/scan_info_builder.rb    2016-02-16 11:37:24 +0900 (41efb01)
+++ lib/mrb/scripts/scan_info_builder.rb    2016-02-16 11:46:13 +0900 (93b3d2d)
@@ -35,6 +35,7 @@ module Groonga
       Operator::GEO_WITHINP8,
       Operator::TERM_EXTRACT,
       Operator::REGEXP,
+      Operator::FUZZY,
     ]
 
     ARITHMETIC_OPERATORS = [
-------------- next part --------------
HTML����������������������������...
Download 



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