-
-static ZEBRA_RES rpn_search_APT_alwaysmatches(ZebraHandle zh,
- Z_AttributesPlusTerm *zapt,
- const char *termz_org,
- oid_value attributeSet,
- NMEM stream,
- int reg_type, int complete_flag,
- const char *rank_type,
- const char *xpath_use,
- int num_bases, char **basenames,
- NMEM rset_nmem,
- RSET *rset,
- struct rset_key_control *kc)
-{
- char term_dst[IT_MAX_WORD+1];
- struct grep_info grep_info;
- zint hits_limit_value;
- const char *term_ref_id_str = 0;
- ZEBRA_RES res;
- struct ord_list *ol;
-
- term_limits_APT(zh, zapt, &hits_limit_value, &term_ref_id_str,
- stream);
- if (grep_info_prepare(zh, zapt, &grep_info, reg_type) == ZEBRA_FAIL)
- return ZEBRA_FAIL;
-
- grep_info.isam_p_indx = 0;
-
- res = always_term(zh, zapt, attributeSet, stream, &grep_info,
- reg_type, complete_flag, num_bases, basenames,
- term_dst, xpath_use, &ol);
- if (res == ZEBRA_OK)
- {
- *rset = rset_trunc(zh, grep_info.isam_p_buf,
- grep_info.isam_p_indx, term_dst, strlen(term_dst),
- rank_type, 1 /* preserve pos */,
- zapt->term->which, rset_nmem,
- kc, kc->scope, ol, reg_type, hits_limit_value,
- term_ref_id_str);
- if (!*rset)
- res = ZEBRA_FAIL;
- }
- grep_info_delete (&grep_info);
- return res;
-}
-