[Groonga-commit] groonga/groonga at d4dde93 [master] proc_fuzzy_search: finalize using lexicon pointer

Back to archive index

naoa null+****@clear*****
Sat Feb 6 02:39:30 JST 2016


naoa	2016-02-06 02:39:30 +0900 (Sat, 06 Feb 2016)

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

  Merged b0800a2: Merge pull request #466 from naoa/proc-fuzzy-unlink

  Message:
    proc_fuzzy_search: finalize using lexicon pointer

  Modified files:
    lib/proc/proc_fuzzy_search.c

  Modified: lib/proc/proc_fuzzy_search.c (+6 -2)
===================================================================
--- lib/proc/proc_fuzzy_search.c    2016-02-05 22:41:43 +0900 (5397592)
+++ lib/proc/proc_fuzzy_search.c    2016-02-06 02:39:30 +0900 (3553a40)
@@ -328,9 +328,13 @@ selector_fuzzy_search(grn_ctx *ctx, grn_obj *table, grn_obj *index,
 
   if (target) {
     grn_obj *lexicon;
+    use_sequential_search = GRN_TRUE;
     lexicon = grn_ctx_at(ctx, target->header.domain);
-    if (lexicon->header.type != GRN_TABLE_PAT_KEY) {
-      use_sequential_search = GRN_TRUE;
+    if (lexicon) {
+      if (lexicon->header.type == GRN_TABLE_PAT_KEY) {
+        use_sequential_search = GRN_FALSE;
+      }
+      grn_obj_unlink(ctx, lexicon);
     }
   } else {
     if (grn_obj_is_key_accessor(ctx, obj) &&
-------------- next part --------------
HTML����������������������������...
Download 



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