| 1 | /* |
| 2 | Copyright (C) 2010-2015 Brazil |
| 3 | Copyright (C) 2020-2022 Sutou Kouhei <[email protected]> |
| 4 | |
| 5 | This library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either |
| 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | |
| 10 | This library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | Lesser General Public License for more details. |
| 14 | |
| 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with this library; if not, write to the Free Software |
| 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | */ |
| 19 | |
| 20 | #include "grn_ctx_impl.h"cxx . . $ `<file>/lib/grn_ctx_impl.h`/ |
| 21 | #include "grn_ii.h"cxx . . $ `<file>/lib/grn_ii.h`/ |
| 22 | #include "grn_index_cursor.h"cxx . . $ `<file>/lib/grn_index_cursor.h`/ |
| 23 | |
| 24 | typedef structcxx . . $ $anonymous_type_e057a498ddb981fe_0# { |
| 25 | grn_db_objcxx . . $ grn_db_obj# objcxx . . $ $anonymous_type_e057a498ddb981fe_0#obj.; |
| 26 | grn_objcxx . . $ grn_obj# *index_columncxx . . $ $anonymous_type_e057a498ddb981fe_0#index_column.; |
| 27 | grn_table_cursorcxx . . $ grn_table_cursor# *tccxx . . $ $anonymous_type_e057a498ddb981fe_0#tc.; |
| 28 | grn_ii_cursorcxx . . $ grn_ii_cursor# *iiccxx . . $ $anonymous_type_e057a498ddb981fe_0#iic.; |
| 29 | boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! next_calledcxx . . $ $anonymous_type_e057a498ddb981fe_0#next_called.; |
| 30 | grn_idcxx . . $ grn_id# term_idcxx . . $ $anonymous_type_e057a498ddb981fe_0#term_id.; |
| 31 | grn_idcxx . . $ grn_id# input_term_idcxx . . $ $anonymous_type_e057a498ddb981fe_0#input_term_id.; |
| 32 | grn_idcxx . . $ grn_id# rid_mincxx . . $ $anonymous_type_e057a498ddb981fe_0#rid_min.; |
| 33 | grn_idcxx . . $ grn_id# rid_maxcxx . . $ $anonymous_type_e057a498ddb981fe_0#rid_max.; |
| 34 | int flagscxx . . $ $anonymous_type_e057a498ddb981fe_0#flags.; |
| 35 | uint32_tcxx . . $ uint32_t# section_idcxx . . $ $anonymous_type_e057a498ddb981fe_0#section_id.; |
| 36 | float scalecxx . . $ $anonymous_type_e057a498ddb981fe_0#scale.; |
| 37 | float *scalescxx . . $ $anonymous_type_e057a498ddb981fe_0#scales.; |
| 38 | size_tcxx . . $ size_t# n_scalescxx . . $ $anonymous_type_e057a498ddb981fe_0#n_scales.; |
| 39 | structcxx . . $ $anonymous_type_e057a498ddb981fe_0#$anonymous_type_1# { |
| 40 | boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! specifiedcxx . . $ $anonymous_type_e057a498ddb981fe_0#$anonymous_type_1#specified.; |
| 41 | uint32_tcxx . . $ uint32_t# startcxx . . $ $anonymous_type_e057a498ddb981fe_0#$anonymous_type_1#start.; |
| 42 | } positioncxx . . $ $anonymous_type_e057a498ddb981fe_0#position.; |
| 43 | } grn_index_cursorcxx . . $ grn_index_cursor#; |
| 44 | |
| 45 | grn_objcxx . . $ grn_obj# * |
| 46 | grn_index_cursor_opencxx . . $ grn_index_cursor_open(a3e8486abe83b7f2).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 47 | grn_table_cursorcxx . . $ grn_table_cursor# *tc, |
| 48 | grn_objcxx . . $ grn_obj# *index_column, |
| 49 | grn_idcxx . . $ grn_id# rid_min, |
| 50 | grn_idcxx . . $ grn_id# rid_max, |
| 51 | int flags) |
| 52 | { |
| 53 | GRN_API_ENTERcxx . . $ `lib/grn_ctx.h:41:9`!; |
| 54 | grn_index_cursorcxx . . $ grn_index_cursor# *ic = GRN_CALLOCcxx . . $ `lib/grn_alloc.h:42:9`!(sizeof(grn_index_cursor)); |
| 55 | if (!ic) { |
| 56 | GRN_API_RETURNcxx . . $ `lib/grn_ctx.h:56:9`!(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!); |
| 57 | } |
| 58 | |
| 59 | ic->tccxx . . $ $anonymous_type_e057a498ddb981fe_0#tc. = tc; |
| 60 | ic->index_columncxx . . $ $anonymous_type_e057a498ddb981fe_0#index_column. = index_column; |
| 61 | ic->iiccxx . . $ $anonymous_type_e057a498ddb981fe_0#iic. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 62 | ic->next_calledcxx . . $ $anonymous_type_e057a498ddb981fe_0#next_called. = falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 63 | ic->term_idcxx . . $ $anonymous_type_e057a498ddb981fe_0#term_id. = GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!; |
| 64 | ic->input_term_idcxx . . $ $anonymous_type_e057a498ddb981fe_0#input_term_id. = GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!; |
| 65 | ic->rid_mincxx . . $ $anonymous_type_e057a498ddb981fe_0#rid_min. = rid_min; |
| 66 | ic->rid_maxcxx . . $ $anonymous_type_e057a498ddb981fe_0#rid_max. = rid_max; |
| 67 | ic->flagscxx . . $ $anonymous_type_e057a498ddb981fe_0#flags. = flags; |
| 68 | ic->section_idcxx . . $ $anonymous_type_e057a498ddb981fe_0#section_id. = 0; |
| 69 | ic->scalecxx . . $ $anonymous_type_e057a498ddb981fe_0#scale. = 1.0; |
| 70 | ic->scalescxx . . $ $anonymous_type_e057a498ddb981fe_0#scales. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 71 | ic->n_scalescxx . . $ $anonymous_type_e057a498ddb981fe_0#n_scales. = 0; |
| 72 | ic->positioncxx . . $ $anonymous_type_e057a498ddb981fe_0#position..specifiedcxx . . $ $anonymous_type_e057a498ddb981fe_0#$anonymous_type_1#specified. = falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 73 | ic->positioncxx . . $ $anonymous_type_e057a498ddb981fe_0#position..startcxx . . $ $anonymous_type_e057a498ddb981fe_0#$anonymous_type_1#start. = 0; |
| 74 | GRN_DB_OBJ_SET_TYPEcxx . . $ `lib/grn_ctx.h:195:9`!(ic, GRN_CURSOR_COLUMN_INDEXcxx . . $ `include/groonga/groonga.h:889:9`!); |
| 75 | { |
| 76 | grn_idcxx . . $ grn_id# id = grn_obj_registercxx . . $ grn_obj_register(5739ee2245199e94).(ctx, ctx->implcxx . . $ _grn_ctx#impl.->dbcxx . . $ _grn_ctx_impl#db., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, 0); |
| 77 | DB_OBJcxx . . $ `lib/grn_db.h:62:9`!(ic)->headercxx . . $ $anonymous_type_4a7c1014017e4c5d_0#header..domaincxx . . $ _grn_obj_header#domain. = GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!; |
| 78 | DB_OBJcxx . . $ `lib/grn_db.h:62:9`!(ic)->rangecxx . . $ $anonymous_type_4a7c1014017e4c5d_0#range. = GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!; |
| 79 | grn_db_obj_initcxx . . $ grn_db_obj_init(e57fea19a9dd2af9).(ctx, ctx->implcxx . . $ _grn_ctx#impl.->dbcxx . . $ _grn_ctx_impl#db., id, DB_OBJcxx . . $ `lib/grn_db.h:62:9`!(ic)); |
| 80 | } |
| 81 | GRN_API_RETURNcxx . . $ `lib/grn_ctx.h:56:9`!((grn_obj *)ic); |
| 82 | } |
| 83 | |
| 84 | void |
| 85 | grn_index_cursor_closecxx . . $ grn_index_cursor_close(cda3a5f3c2e53c6b).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_objcxx . . $ grn_obj# *index_cursor) |
| 86 | { |
| 87 | grn_index_cursorcxx . . $ grn_index_cursor# *ic = (grn_index_cursorcxx . . $ grn_index_cursor# *)index_cursor; |
| 88 | if (ic->iiccxx . . $ $anonymous_type_e057a498ddb981fe_0#iic.) { |
| 89 | grn_ii_cursor_closecxx . . $ grn_ii_cursor_close(9f30b86a43abe2c6).(ctx, ic->iiccxx . . $ $anonymous_type_e057a498ddb981fe_0#iic.); |
| 90 | } |
| 91 | GRN_FREEcxx . . $ `lib/grn_alloc.h:49:9`!(ic); |
| 92 | } |
| 93 | |
| 94 | grn_objcxx . . $ grn_obj# * |
| 95 | grn_index_cursor_get_index_columncxx . . $ grn_index_cursor_get_index_column(e9f40e4080908c1e).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 96 | grn_objcxx . . $ grn_obj# *index_cursor) |
| 97 | { |
| 98 | GRN_API_ENTERcxx . . $ `lib/grn_ctx.h:41:9`!; |
| 99 | grn_index_cursorcxx . . $ grn_index_cursor# *ic = (grn_index_cursorcxx . . $ grn_index_cursor# *)index_cursor; |
| 100 | grn_objcxx . . $ grn_obj# *index_column = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 101 | if (ic) { |
| 102 | index_column = ic->index_columncxx . . $ $anonymous_type_e057a498ddb981fe_0#index_column.; |
| 103 | } |
| 104 | GRN_API_RETURNcxx . . $ `lib/grn_ctx.h:56:9`!(index_column); |
| 105 | } |
| 106 | |
| 107 | grn_rccxx . . $ grn_rc# |
| 108 | grn_index_cursor_set_term_idcxx . . $ grn_index_cursor_set_term_id(aedbc3eaefbe393f).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 109 | grn_objcxx . . $ grn_obj# *index_cursor, |
| 110 | grn_idcxx . . $ grn_id# term_id) |
| 111 | { |
| 112 | grn_index_cursorcxx . . $ grn_index_cursor# *cursor = (grn_index_cursorcxx . . $ grn_index_cursor# *)index_cursor; |
| 113 | GRN_API_ENTERcxx . . $ `lib/grn_ctx.h:41:9`!; |
| 114 | if (!cursor) { |
| 115 | ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT, "[index-cursor][set-term-id] must not NULL"); |
| 116 | goto exit; |
| 117 | } |
| 118 | if (cursor->tccxx . . $ $anonymous_type_e057a498ddb981fe_0#tc.) { |
| 119 | ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT, |
| 120 | "[index-cursor][set-term-id] " |
| 121 | "setting term ID against index cursor with table cursor " |
| 122 | "isn't supported"); |
| 123 | goto exit; |
| 124 | } |
| 125 | cursor->input_term_idcxx . . $ $anonymous_type_e057a498ddb981fe_0#input_term_id. = term_id; |
| 126 | exit : |
| 127 | GRN_API_RETURNcxx . . $ `lib/grn_ctx.h:56:9`!(ctx->rc); |
| 128 | } |
| 129 | |
| 130 | grn_rccxx . . $ grn_rc# |
| 131 | grn_index_cursor_set_section_idcxx . . $ grn_index_cursor_set_section_id(aedbc3eaefbe393f).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 132 | grn_objcxx . . $ grn_obj# *index_cursor, |
| 133 | uint32_tcxx . . $ uint32_t# section_id) |
| 134 | { |
| 135 | GRN_API_ENTERcxx . . $ `lib/grn_ctx.h:41:9`!; |
| 136 | grn_index_cursorcxx . . $ grn_index_cursor# *ic = (grn_index_cursorcxx . . $ grn_index_cursor# *)index_cursor; |
| 137 | if (ic) { |
| 138 | ic->section_idcxx . . $ $anonymous_type_e057a498ddb981fe_0#section_id. = section_id; |
| 139 | } |
| 140 | GRN_API_RETURNcxx . . $ `lib/grn_ctx.h:56:9`!(ctx->rc); |
| 141 | } |
| 142 | |
| 143 | uint32_tcxx . . $ uint32_t# |
| 144 | grn_index_cursor_get_section_idcxx . . $ grn_index_cursor_get_section_id(8dd58acc9865e889).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 145 | grn_objcxx . . $ grn_obj# *index_cursor) |
| 146 | { |
| 147 | GRN_API_ENTERcxx . . $ `lib/grn_ctx.h:41:9`!; |
| 148 | grn_index_cursorcxx . . $ grn_index_cursor# *ic = (grn_index_cursorcxx . . $ grn_index_cursor# *)index_cursor; |
| 149 | if (ic) { |
| 150 | GRN_API_RETURNcxx . . $ `lib/grn_ctx.h:56:9`!(ic->section_id); |
| 151 | } else { |
| 152 | GRN_API_RETURNcxx . . $ `lib/grn_ctx.h:56:9`!(0); |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | grn_rccxx . . $ grn_rc# |
| 157 | grn_index_cursor_set_scalecxx . . $ grn_index_cursor_set_scale(1baff083bef0534b).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 158 | grn_objcxx . . $ grn_obj# *index_cursor, |
| 159 | float scale) |
| 160 | { |
| 161 | GRN_API_ENTERcxx . . $ `lib/grn_ctx.h:41:9`!; |
| 162 | grn_index_cursorcxx . . $ grn_index_cursor# *ic = (grn_index_cursorcxx . . $ grn_index_cursor# *)index_cursor; |
| 163 | if (ic) { |
| 164 | ic->scalecxx . . $ $anonymous_type_e057a498ddb981fe_0#scale. = scale; |
| 165 | } |
| 166 | GRN_API_RETURNcxx . . $ `lib/grn_ctx.h:56:9`!(ctx->rc); |
| 167 | } |
| 168 | |
| 169 | grn_rccxx . . $ grn_rc# |
| 170 | grn_index_cursor_set_scalescxx . . $ grn_index_cursor_set_scales(36b947581a015c0b).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 171 | grn_objcxx . . $ grn_obj# *index_cursor, |
| 172 | float *scales, |
| 173 | size_tcxx . . $ size_t# n_scales) |
| 174 | { |
| 175 | GRN_API_ENTERcxx . . $ `lib/grn_ctx.h:41:9`!; |
| 176 | grn_index_cursorcxx . . $ grn_index_cursor# *ic = (grn_index_cursorcxx . . $ grn_index_cursor# *)index_cursor; |
| 177 | if (ic) { |
| 178 | ic->scalescxx . . $ $anonymous_type_e057a498ddb981fe_0#scales. = scales; |
| 179 | ic->n_scalescxx . . $ $anonymous_type_e057a498ddb981fe_0#n_scales. = n_scales; |
| 180 | } |
| 181 | GRN_API_RETURNcxx . . $ `lib/grn_ctx.h:56:9`!(ctx->rc); |
| 182 | } |
| 183 | |
| 184 | grn_rccxx . . $ grn_rc# |
| 185 | grn_index_cursor_set_start_positioncxx . . $ grn_index_cursor_set_start_position(aedbc3eaefbe393f).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 186 | grn_objcxx . . $ grn_obj# *index_cursor, |
| 187 | uint32_tcxx . . $ uint32_t# position) |
| 188 | { |
| 189 | GRN_API_ENTERcxx . . $ `lib/grn_ctx.h:41:9`!; |
| 190 | grn_index_cursorcxx . . $ grn_index_cursor# *ic = (grn_index_cursorcxx . . $ grn_index_cursor# *)index_cursor; |
| 191 | if (ic) { |
| 192 | ic->positioncxx . . $ $anonymous_type_e057a498ddb981fe_0#position..specifiedcxx . . $ $anonymous_type_e057a498ddb981fe_0#$anonymous_type_1#specified. = truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 193 | ic->positioncxx . . $ $anonymous_type_e057a498ddb981fe_0#position..startcxx . . $ $anonymous_type_e057a498ddb981fe_0#$anonymous_type_1#start. = position; |
| 194 | } |
| 195 | GRN_API_RETURNcxx . . $ `lib/grn_ctx.h:56:9`!(ctx->rc); |
| 196 | } |
| 197 | |
| 198 | grn_rccxx . . $ grn_rc# |
| 199 | grn_index_cursor_reset_start_positioncxx . . $ grn_index_cursor_reset_start_position(4865d068a46d0f83).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 200 | grn_objcxx . . $ grn_obj# *index_cursor) |
| 201 | { |
| 202 | GRN_API_ENTERcxx . . $ `lib/grn_ctx.h:41:9`!; |
| 203 | grn_index_cursorcxx . . $ grn_index_cursor# *ic = (grn_index_cursorcxx . . $ grn_index_cursor# *)index_cursor; |
| 204 | if (ic) { |
| 205 | ic->positioncxx . . $ $anonymous_type_e057a498ddb981fe_0#position..specifiedcxx . . $ $anonymous_type_e057a498ddb981fe_0#$anonymous_type_1#specified. = falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 206 | } |
| 207 | GRN_API_RETURNcxx . . $ `lib/grn_ctx.h:56:9`!(ctx->rc); |
| 208 | } |
| 209 | |
| 210 | uint32_tcxx . . $ uint32_t# |
| 211 | grn_index_cursor_get_start_positioncxx . . $ grn_index_cursor_get_start_position(8dd58acc9865e889).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 212 | grn_objcxx . . $ grn_obj# *index_cursor) |
| 213 | { |
| 214 | GRN_API_ENTERcxx . . $ `lib/grn_ctx.h:41:9`!; |
| 215 | grn_index_cursorcxx . . $ grn_index_cursor# *ic = (grn_index_cursorcxx . . $ grn_index_cursor# *)index_cursor; |
| 216 | if (ic && ic->positioncxx . . $ $anonymous_type_e057a498ddb981fe_0#position..specifiedcxx . . $ $anonymous_type_e057a498ddb981fe_0#$anonymous_type_1#specified.) { |
| 217 | GRN_API_RETURNcxx . . $ `lib/grn_ctx.h:56:9`!(ic->position.start); |
| 218 | } else { |
| 219 | GRN_API_RETURNcxx . . $ `lib/grn_ctx.h:56:9`!(0); |
| 220 | } |
| 221 | } |
| 222 | |
| 223 | grn_postingcxx . . $ grn_posting# * |
| 224 | grn_index_cursor_next_internalcxx . . $ grn_index_cursor_next_internal(3cab7613c03ebc21).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 225 | grn_objcxx . . $ grn_obj# *index_cursor, |
| 226 | grn_idcxx . . $ grn_id# *term_id) |
| 227 | { |
| 228 | grn_postingcxx . . $ grn_posting# *posting = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 229 | grn_index_cursorcxx . . $ grn_index_cursor# *ic = (grn_index_cursorcxx . . $ grn_index_cursor# *)index_cursor; |
| 230 | while (truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!) { |
| 231 | if (ic->iiccxx . . $ $anonymous_type_e057a498ddb981fe_0#iic.) { |
| 232 | if (ic->flagscxx . . $ $anonymous_type_e057a498ddb981fe_0#flags. & GRN_OBJ_WITH_POSITIONcxx . . $ `include/groonga/groonga.h:794:9`!) { |
| 233 | while (truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!) { |
| 234 | if (ic->next_calledcxx . . $ $anonymous_type_e057a498ddb981fe_0#next_called.) { |
| 235 | posting = grn_ii_cursor_next_poscxx . . $ grn_ii_cursor_next_pos(2ca859fa2305fa5c).(ctx, ic->iiccxx . . $ $anonymous_type_e057a498ddb981fe_0#iic.); |
| 236 | if (posting) { |
| 237 | if (ic->positioncxx . . $ $anonymous_type_e057a498ddb981fe_0#position..specifiedcxx . . $ $anonymous_type_e057a498ddb981fe_0#$anonymous_type_1#specified.) { |
| 238 | if (posting->poscxx . . $ $anonymous_type_abfcd92361d8c963_0#pos. == ic->positioncxx . . $ $anonymous_type_e057a498ddb981fe_0#position..startcxx . . $ $anonymous_type_e057a498ddb981fe_0#$anonymous_type_1#start.) { |
| 239 | break; |
| 240 | } |
| 241 | } else { |
| 242 | break; |
| 243 | } |
| 244 | } |
| 245 | } |
| 246 | |
| 247 | grn_postingcxx . . $ grn_posting# *ii_posting; |
| 248 | while ((ii_posting = grn_ii_cursor_nextcxx . . $ grn_ii_cursor_next(2ca859fa2305fa5c).(ctx, ic->iiccxx . . $ $anonymous_type_e057a498ddb981fe_0#iic.))) { |
| 249 | if (!(ic->section_idcxx . . $ $anonymous_type_e057a498ddb981fe_0#section_id. == 0 || ii_posting->sidcxx . . $ $anonymous_type_abfcd92361d8c963_0#sid. == ic->section_idcxx . . $ $anonymous_type_e057a498ddb981fe_0#section_id.)) { |
| 250 | continue; |
| 251 | } |
| 252 | break; |
| 253 | } |
| 254 | ic->next_calledcxx . . $ $anonymous_type_e057a498ddb981fe_0#next_called. = truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 255 | if (!ii_posting) { |
| 256 | break; |
| 257 | } |
| 258 | } |
| 259 | } else { |
| 260 | while ((posting = grn_ii_cursor_nextcxx . . $ grn_ii_cursor_next(2ca859fa2305fa5c).(ctx, ic->iiccxx . . $ $anonymous_type_e057a498ddb981fe_0#iic.))) { |
| 261 | if (!(ic->section_idcxx . . $ $anonymous_type_e057a498ddb981fe_0#section_id. == 0 || posting->sidcxx . . $ $anonymous_type_abfcd92361d8c963_0#sid. == ic->section_idcxx . . $ $anonymous_type_e057a498ddb981fe_0#section_id.)) { |
| 262 | continue; |
| 263 | } |
| 264 | if (ic->positioncxx . . $ $anonymous_type_e057a498ddb981fe_0#position..specifiedcxx . . $ $anonymous_type_e057a498ddb981fe_0#$anonymous_type_1#specified.) { |
| 265 | while ((posting = grn_ii_cursor_next_poscxx . . $ grn_ii_cursor_next_pos(2ca859fa2305fa5c).(ctx, ic->iiccxx . . $ $anonymous_type_e057a498ddb981fe_0#iic.))) { |
| 266 | if (posting->poscxx . . $ $anonymous_type_abfcd92361d8c963_0#pos. == ic->positioncxx . . $ $anonymous_type_e057a498ddb981fe_0#position..startcxx . . $ $anonymous_type_e057a498ddb981fe_0#$anonymous_type_1#start.) { |
| 267 | break; |
| 268 | } |
| 269 | } |
| 270 | if (!posting) { |
| 271 | continue; |
| 272 | } |
| 273 | } |
| 274 | break; |
| 275 | } |
| 276 | } |
| 277 | } |
| 278 | if (posting) { |
| 279 | break; |
| 280 | } |
| 281 | |
| 282 | if (ic->tccxx . . $ $anonymous_type_e057a498ddb981fe_0#tc.) { |
| 283 | ic->term_idcxx . . $ $anonymous_type_e057a498ddb981fe_0#term_id. = grn_table_cursor_nextcxx . . $ grn_table_cursor_next(8dd58acc9865e889).(ctx, ic->tccxx . . $ $anonymous_type_e057a498ddb981fe_0#tc.); |
| 284 | } else { |
| 285 | ic->term_idcxx . . $ $anonymous_type_e057a498ddb981fe_0#term_id. = ic->input_term_idcxx . . $ $anonymous_type_e057a498ddb981fe_0#input_term_id.; |
| 286 | ic->input_term_idcxx . . $ $anonymous_type_e057a498ddb981fe_0#input_term_id. = GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!; |
| 287 | } |
| 288 | if (ic->term_idcxx . . $ $anonymous_type_e057a498ddb981fe_0#term_id. == GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) { |
| 289 | break; |
| 290 | } |
| 291 | grn_iicxx . . $ grn_ii# *ii = (grn_iicxx . . $ grn_ii# *)ic->index_columncxx . . $ $anonymous_type_e057a498ddb981fe_0#index_column.; |
| 292 | if (ic->iiccxx . . $ $anonymous_type_e057a498ddb981fe_0#iic.) { |
| 293 | grn_ii_cursor_closecxx . . $ grn_ii_cursor_close(9f30b86a43abe2c6).(ctx, ic->iiccxx . . $ $anonymous_type_e057a498ddb981fe_0#iic.); |
| 294 | } |
| 295 | ic->iiccxx . . $ $anonymous_type_e057a498ddb981fe_0#iic. = grn_ii_cursor_opencxx . . $ grn_ii_cursor_open(5e1f33d5cbef52bd).(ctx, |
| 296 | ii, |
| 297 | ic->term_idcxx . . $ $anonymous_type_e057a498ddb981fe_0#term_id., |
| 298 | ic->rid_mincxx . . $ $anonymous_type_e057a498ddb981fe_0#rid_min., |
| 299 | ic->rid_maxcxx . . $ $anonymous_type_e057a498ddb981fe_0#rid_max., |
| 300 | (int)(ii->n_elementscxx . . $ _grn_ii#n_elements.), |
| 301 | ic->flagscxx . . $ $anonymous_type_e057a498ddb981fe_0#flags.); |
| 302 | if (ic->iiccxx . . $ $anonymous_type_e057a498ddb981fe_0#iic.) { |
| 303 | if (ic->n_scalescxx . . $ $anonymous_type_e057a498ddb981fe_0#n_scales. > 0) { |
| 304 | grn_ii_cursor_set_scalescxx . . $ grn_ii_cursor_set_scales(517f343e4c2cb671).(ctx, ic->iiccxx . . $ $anonymous_type_e057a498ddb981fe_0#iic., ic->scalescxx . . $ $anonymous_type_e057a498ddb981fe_0#scales., ic->n_scalescxx . . $ $anonymous_type_e057a498ddb981fe_0#n_scales.); |
| 305 | } else { |
| 306 | grn_ii_cursor_set_scalecxx . . $ grn_ii_cursor_set_scale(a25c1f0084a7572c).(ctx, ic->iiccxx . . $ $anonymous_type_e057a498ddb981fe_0#iic., ic->scalecxx . . $ $anonymous_type_e057a498ddb981fe_0#scale.); |
| 307 | } |
| 308 | } |
| 309 | ic->next_calledcxx . . $ $anonymous_type_e057a498ddb981fe_0#next_called. = falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 310 | } |
| 311 | if (term_id) { |
| 312 | *term_id = ic->term_idcxx . . $ $anonymous_type_e057a498ddb981fe_0#term_id.; |
| 313 | } |
| 314 | return posting; |
| 315 | } |
| 316 | |
| 317 | grn_postingcxx . . $ grn_posting# * |
| 318 | grn_index_cursor_nextcxx . . $ grn_index_cursor_next(3cab7613c03ebc21).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 319 | grn_objcxx . . $ grn_obj# *index_cursor, |
| 320 | grn_idcxx . . $ grn_id# *term_id) |
| 321 | { |
| 322 | GRN_API_ENTERcxx . . $ `lib/grn_ctx.h:41:9`!; |
| 323 | grn_postingcxx . . $ grn_posting# *posting = grn_index_cursor_next_internalcxx . . $ grn_index_cursor_next_internal(3cab7613c03ebc21).(ctx, |
| 324 | index_cursor, |
| 325 | term_id); |
| 326 | GRN_API_RETURNcxx . . $ `lib/grn_ctx.h:56:9`!(posting); |
| 327 | } |