[Groonga-commit] groonga/groonga at 988b67e [master] token_cursor: add support for new token API on no tokenizer case

Back to archive index
Kouhei Sutou null+****@clear*****
Tue Dec 25 12:17:44 JST 2018


Kouhei Sutou	2018-12-25 12:17:44 +0900 (Tue, 25 Dec 2018)

  Revision: 988b67e1b0421c428dcf052e1504b638caae14d5
  https://github.com/groonga/groonga/commit/988b67e1b0421c428dcf052e1504b638caae14d5

  Message:
    token_cursor: add support for new token API on no tokenizer case

  Modified files:
    lib/token_cursor.c

  Modified: lib/token_cursor.c (+7 -0)
===================================================================
--- lib/token_cursor.c    2018-12-21 10:48:53 +0900 (2d589c8de)
+++ lib/token_cursor.c    2018-12-25 12:17:44 +0900 (44f130dcc)
@@ -153,6 +153,13 @@ grn_token_cursor_open(grn_ctx *ctx, grn_obj *table,
                               &(token_cursor->curr_size),
                               NULL);
     token_cursor->curr = (const unsigned char *)normalized;
+    grn_token_set_data(ctx,
+                       &(token_cursor->tokenizer.current_token),
+                       token_cursor->curr,
+                       token_cursor->curr_size);
+    grn_token_set_status(ctx,
+                         &(token_cursor->tokenizer.current_token),
+                         GRN_TOKEN_LAST);
   }
 
   if (ctx->rc == GRN_SUCCESS) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20181225/5d9b684a/attachment.html>


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