Kouhei Sutou
null+****@clear*****
Wed Nov 9 17:23:30 JST 2016
Kouhei Sutou 2016-11-09 17:23:30 +0900 (Wed, 09 Nov 2016) New Revision: 5bb4652038472540319ea4078bbe41a9d68a4cb3 https://github.com/pgroonga/pgroonga/commit/5bb4652038472540319ea4078bbe41a9d68a4cb3 Message: Fix fallback implementation of pgroonga_tuple_is_valid() Modified files: src/pgrn_groonga_tuple_is_alive.c Modified: src/pgrn_groonga_tuple_is_alive.c (+19 -1) =================================================================== --- src/pgrn_groonga_tuple_is_alive.c 2016-11-09 17:10:45 +0900 (ffd52d9) +++ src/pgrn_groonga_tuple_is_alive.c 2016-11-09 17:23:30 +0900 (38fb161) @@ -210,12 +210,30 @@ selector_pgroonga_tuple_is_alive(grn_ctx *ctx, { if (op == GRN_OP_AND) { - GRN_TABLE_EACH_BEGIN(ctx, table, cursor, id) + GRN_TABLE_EACH_BEGIN(ctx, res, cursor, id) { grn_table_cursor_delete(ctx, cursor); } GRN_TABLE_EACH_END(ctx, cursor); } + else + { + grn_posting posting; + + memset(&posting, 0, sizeof(grn_posting)); + GRN_TABLE_EACH_BEGIN(ctx, table, cursor, id) + { + grn_rc grn_ii_posting_add(grn_ctx *ctx, + grn_posting *pos, + grn_hash *s, + grn_operator op); + posting.rid = id; + grn_ii_posting_add(ctx, &posting, (grn_hash *)res, op); + } + GRN_TABLE_EACH_END(ctx, cursor); + /* TODO: Enable it when we support GRN_OP_AND_NOT and GRN_OP_ADJUST. */ + /* grn_ii_resolve_sel_and(ctx, res, op); */ + } } return ctx->rc; -------------- next part -------------- HTML����������������������������...Download