Navigation Menu

Skip to content

Commit

Permalink
Support Groonga 7.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 25, 2017
1 parent 250dd0b commit 9097538
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/mrn_condition_converter.cpp
Expand Up @@ -542,7 +542,14 @@ namespace mrn {
append_const_item(field_item, max_item, expression);
grn_expr_append_const(ctx_, expression, &include, GRN_OP_PUSH, 1);

grn_expr_append_op(ctx_, expression, GRN_OP_CALL, 5);
int call_n_args = 5;
// TODO: Remove this condition when we drop Groonga 7.0.1 or
// earlier support or Groonga 10 is released.
if (strcmp(grn_get_version(), "7.0.2") >= 0 ||
strcmp(grn_get_version(), "7.0.1-105-") >= 0) {
call_n_args++;
}
grn_expr_append_op(ctx_, expression, GRN_OP_CALL, call_n_args);

grn_expr_append_op(ctx_, expression, GRN_OP_AND, 2);

Expand Down

0 comments on commit 9097538

Please sign in to comment.