[Groonga-commit] groonga/groonga [master] ignore unindexed term

Back to archive index

null+****@clear***** null+****@clear*****
2012年 3月 7日 (水) 00:56:30 JST


Kouhei Sutou	2012-03-07 00:56:30 +0900 (Wed, 07 Mar 2012)

  New Revision: ecdc4e98bed0f386967ed5a2bee62c98921ebfae

  Log:
    ignore unindexed term
    
    fixes #1303

  Modified files:
    lib/db.c

  Modified: lib/db.c (+2 -1)
===================================================================
--- lib/db.c    2012-03-07 01:09:26 +0900 (b984b36)
+++ lib/db.c    2012-03-07 00:56:30 +0900 (87c095e)
@@ -2618,13 +2618,14 @@ grn_index_cursor_next(grn_ctx *ctx, grn_obj *c, grn_id *tid)
   GRN_API_ENTER;
   if (ic->iic) { ip = grn_ii_cursor_next(ctx, ic->iic); }
   if (!ip) {
-    if ((ic->tid = grn_table_cursor_next_inline(ctx, ic->tc))) {
+    while ((ic->tid = grn_table_cursor_next_inline(ctx, ic->tc))) {
       grn_ii *ii = (grn_ii *)ic->index;
       if (ic->iic) { grn_ii_cursor_close(ctx, ic->iic); }
       if ((ic->iic = grn_ii_cursor_open(ctx, ii, ic->tid,
                                         ic->rid_min, ic->rid_max,
                                         ii->n_elements, ic->flags))) {
         ip = grn_ii_cursor_next(ctx, ic->iic);
+        break;
       }
     }
   }




Groonga-commit メーリングリストの案内
Back to archive index