[Groonga-commit] groonga/groonga at adefbe8 [master] index_column_diff: don't run tokenizer for empty value

Back to archive index
Kouhei Sutou null+****@clear*****
Tue Mar 19 16:58:18 JST 2019


Kouhei Sutou	2019-03-19 16:58:18 +0900 (Tue, 19 Mar 2019)

  Revision: adefbe85e094750704da8cb89ca61c7dfbff8caf
  https://github.com/groonga/groonga/commit/adefbe85e094750704da8cb89ca61c7dfbff8caf

  Message:
    index_column_diff: don't run tokenizer for empty value

  Modified files:
    lib/index_column.c

  Modified: lib/index_column.c (+4 -0)
===================================================================
--- lib/index_column.c    2019-03-19 15:42:23 +0900 (ff4ae76f1)
+++ lib/index_column.c    2019-03-19 16:58:18 +0900 (17f81e194)
@@ -564,6 +564,10 @@ grn_index_column_diff_compute(grn_ctx *ctx,
       GRN_BULK_REWIND(value);
       grn_obj_get_value(ctx, source, id, value);
 
+      if (GRN_BULK_VSIZE(value) == 0) {
+        continue;
+      }
+
       const unsigned int token_cursor_flags = 0;
       grn_token_cursor *token_cursor =
         grn_token_cursor_open(ctx,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190319/eecb6592/attachment.html>


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