-/* $Id: zrpn.c,v 1.211 2006-05-09 10:46:56 adam Exp $
- Copyright (C) 1995-2005
+/* $Id: zrpn.c,v 1.214 2006-05-19 13:49:34 adam Exp $
+ Copyright (C) 1995-2006
Index Data ApS
This file is part of the Zebra server.
#include <yaz/diagbib1.h>
#include "index.h"
#include <zebra_xpath.h>
-
+#include <attrfind.h>
#include <charmap.h>
#include <rset.h>
int reg_type;
};
-typedef struct
-{
- int type;
- int major;
- int minor;
- Z_AttributesPlusTerm *zapt;
-} AttrType;
-
static int log_level_set = 0;
static int log_level_rpn = 0;
dict_grep_cmap(reg->dict, map_info, rpn_char_map_handler);
}
-static int attr_find_ex(AttrType *src, oid_value *attributeSetP,
- const char **string_value)
-{
- int num_attributes;
-
- num_attributes = src->zapt->attributes->num_attributes;
- while (src->major < num_attributes)
- {
- Z_AttributeElement *element;
-
- element = src->zapt->attributes->attributes[src->major];
- if (src->type == *element->attributeType)
- {
- switch (element->which)
- {
- case Z_AttributeValue_numeric:
- ++(src->major);
- if (element->attributeSet && attributeSetP)
- {
- oident *attrset;
-
- attrset = oid_getentbyoid(element->attributeSet);
- *attributeSetP = attrset->value;
- }
- return *element->value.numeric;
- break;
- case Z_AttributeValue_complex:
- if (src->minor >= element->value.complex->num_list)
- break;
- if (element->attributeSet && attributeSetP)
- {
- oident *attrset;
-
- attrset = oid_getentbyoid(element->attributeSet);
- *attributeSetP = attrset->value;
- }
- if (element->value.complex->list[src->minor]->which ==
- Z_StringOrNumeric_numeric)
- {
- ++(src->minor);
- return
- *element->value.complex->list[src->minor-1]->u.numeric;
- }
- else if (element->value.complex->list[src->minor]->which ==
- Z_StringOrNumeric_string)
- {
- if (!string_value)
- break;
- ++(src->minor);
- *string_value =
- element->value.complex->list[src->minor-1]->u.string;
- return -2;
- }
- else
- break;
- default:
- assert(0);
- }
- }
- ++(src->major);
- }
- return -1;
-}
-
-static int attr_find(AttrType *src, oid_value *attributeSetP)
-{
- return attr_find_ex(src, attributeSetP, 0);
-}
-
-static void attr_init(AttrType *src, Z_AttributesPlusTerm *zapt,
- int type)
-{
- src->zapt = zapt;
- src->type = type;
- src->major = 0;
- src->minor = 0;
-}
-
#define TERM_COUNT
struct grep_info {
char *term_tmp = term_dict + strlen(term_dict);
char term_component[2*IT_MAX_WORD+20];
- attr_init(&relation, zapt, 2);
+ attr_init_APT(&relation, zapt, 2);
relation_value = attr_find(&relation, NULL);
*error_code = 0;
break;
case 3:
case 102:
+ case 103:
case -1:
+ if (!**term_sub)
+ return 1;
yaz_log(log_level_rpn, "Relation =");
if (!term_100(zh->reg->zebra_maps, reg_type, term_sub,
term_component, space_split, term_dst))
struct grep_info *grep_info,
int reg_type, int complete_flag,
int num_bases, char **basenames,
- char *term_dst, int xpath_use,
+ char *term_dst,
+ const char *xpath_use,
struct ord_list **ol);
static ZEBRA_RES term_limits_APT(ZebraHandle zh,
AttrType hits_limit_attr;
int term_ref_id_int;
- attr_init(&hits_limit_attr, zapt, 9);
+ attr_init_APT(&hits_limit_attr, zapt, 9);
*hits_limit_value = attr_find(&hits_limit_attr, NULL);
- attr_init(&term_ref_id_attr, zapt, 10);
+ attr_init_APT(&term_ref_id_attr, zapt, 10);
term_ref_id_int = attr_find_ex(&term_ref_id_attr, NULL, term_ref_id_str);
if (term_ref_id_int >= 0)
{
int reg_type, int complete_flag,
int num_bases, char **basenames,
char *term_dst,
- const char *rank_type, int xpath_use,
+ const char *rank_type,
+ const char *xpath_use,
NMEM rset_nmem,
RSET *rset,
struct rset_key_control *kc)
struct grep_info *grep_info,
int reg_type, int complete_flag,
int num_bases, char **basenames,
- char *term_dst, int xpath_use,
+ char *term_dst,
+ const char *xpath_use,
struct ord_list **ol)
{
char term_dict[2*IT_MAX_WORD+4000];
int j, r, base_no;
AttrType truncation;
int truncation_value;
- AttrType use;
- int use_value;
- const char *use_string = 0;
oid_value curAttributeSet = attributeSet;
const char *termp;
struct rpn_char_map_info rcmi;
*ol = ord_list_create(stream);
rpn_char_map_prepare (zh->reg, reg_type, &rcmi);
- attr_init(&use, zapt, 1);
- use_value = attr_find_ex(&use, &curAttributeSet, &use_string);
- yaz_log(log_level_rpn, "string_term, use value %d", use_value);
- attr_init(&truncation, zapt, 5);
+ attr_init_APT(&truncation, zapt, 5);
truncation_value = attr_find(&truncation, NULL);
yaz_log(log_level_rpn, "truncation value %d", truncation_value);
- if (use_value == -1) /* no attribute - assumy "any" */
- use_value = 1016;
for (base_no = 0; base_no < num_bases; base_no++)
{
int ord = -1;
int attr_ok = 0;
int regex_range = 0;
int init_pos = 0;
+#if 0
attent attp;
data1_local_attribute id_xpath_attr;
data1_local_attribute *local_attr;
+#endif
int max_pos, prefix_len = 0;
int relation_error;
+ char ord_buf[32];
+ int ord_len, i;
termp = *term_sub;
basenames[base_no]);
return ZEBRA_FAIL;
}
- if (xpath_use > 0 && use_value == -2)
- {
- /* xpath mode and we have a string attribute */
- attp.local_attributes = &id_xpath_attr;
- attp.attset_ordinal = VAL_IDXPATH;
- id_xpath_attr.next = 0;
-
- use_value = xpath_use; /* xpath_use as use-attribute now */
- id_xpath_attr.local = use_value;
- }
- else if (curAttributeSet == VAL_IDXPATH && use_value >= 0)
+
+ if (zebra_apt_get_ord(zh, zapt, reg_type, xpath_use,
+ curAttributeSet, &ord)
+ != ZEBRA_OK)
{
- /* X-Path attribute, use numeric value directly */
- attp.local_attributes = &id_xpath_attr;
- attp.attset_ordinal = VAL_IDXPATH;
- id_xpath_attr.next = 0;
- id_xpath_attr.local = use_value;
+ break;
}
- else if (use_string &&
- (ord = zebraExplain_lookup_attr_str(zh->reg->zei,
- reg_type,
- use_string)) >= 0)
- {
- /* we have a match for a raw string attribute */
- char ord_buf[32];
- int i, ord_len;
-
- if (prefix_len)
- term_dict[prefix_len++] = '|';
- else
- term_dict[prefix_len++] = '(';
-
- ord_len = key_SU_encode (ord, ord_buf);
- for (i = 0; i<ord_len; i++)
- {
- term_dict[prefix_len++] = 1;
- term_dict[prefix_len++] = ord_buf[i];
- }
- attp.local_attributes = 0; /* no more attributes */
- *ol = ord_list_append(stream, *ol, ord);
- }
- else
+ *ol = ord_list_append(stream, *ol, ord);
+
+ if (prefix_len)
+ term_dict[prefix_len++] = '|';
+ else
+ term_dict[prefix_len++] = '(';
+
+ ord_len = key_SU_encode (ord, ord_buf);
+ for (i = 0; i<ord_len; i++)
{
- /* lookup in the .att files . Allow string as well */
- if ((r = att_getentbyatt (zh, &attp, curAttributeSet, use_value,
- use_string)))
- {
- yaz_log(YLOG_DEBUG, "att_getentbyatt fail. set=%d use=%d r=%d",
- curAttributeSet, use_value, r);
- if (r == -1)
- {
- /* set was found, but value wasn't defined */
- if (use_string)
- zebra_setError(zh,
- YAZ_BIB1_UNSUPP_USE_ATTRIBUTE,
- use_string);
- else
- zebra_setError_zint(zh, YAZ_BIB1_UNSUPP_USE_ATTRIBUTE,
- use_value);
- }
- else
- {
- int oid[OID_SIZE];
- struct oident oident;
-
- oident.proto = PROTO_Z3950;
- oident.oclass = CLASS_ATTSET;
- oident.value = curAttributeSet;
- oid_ent_to_oid (&oident, oid);
-
- zebra_setError(zh,
- YAZ_BIB1_UNSUPP_ATTRIBUTE_SET,
- oident.desc);
-
- }
- continue;
- }
- }
- for (local_attr = attp.local_attributes; local_attr;
- local_attr = local_attr->next)
- {
- char ord_buf[32];
- int i, ord_len;
-
- ord = zebraExplain_lookup_attr_su(zh->reg->zei,
- reg_type,
- attp.attset_ordinal,
- local_attr->local);
- if (ord < 0)
- continue;
- *ol = ord_list_append(stream, *ol, ord);
- if (prefix_len)
- term_dict[prefix_len++] = '|';
- else
- term_dict[prefix_len++] = '(';
-
- ord_len = key_SU_encode (ord, ord_buf);
- for (i = 0; i<ord_len; i++)
- {
- term_dict[prefix_len++] = 1;
+ term_dict[prefix_len++] = 1;
term_dict[prefix_len++] = ord_buf[i];
- }
- if (ord_len > init_pos)
- init_pos = ord_len;
- }
+ }
+ if (ord_len > init_pos)
+ init_pos = ord_len;
+
bases_ok++;
if (prefix_len)
attr_ok = 1;
if (!zapt)
return ZEBRA_OK;
- attr_init(&termset, zapt, 8);
+ attr_init_APT(&termset, zapt, 8);
termset_value_numeric =
attr_find_ex(&termset, NULL, &termset_value_string);
if (termset_value_numeric != -1)
oid_value attributeSet,
NMEM stream,
int reg_type, int complete_flag,
- const char *rank_type, int xpath_use,
+ const char *rank_type,
+ const char *xpath_use,
int num_bases, char **basenames,
NMEM rset_nmem,
RSET **result_sets, int *num_result_sets,
struct grep_info grep_info;
const char *termp = termz;
int alloc_sets = 0;
+ int empty_term = *termz ? 0 : 1;
+ empty_term = 0;
*num_result_sets = 0;
*term_dst = 0;
if (grep_info_prepare(zh, zapt, &grep_info, reg_type) == ZEBRA_FAIL)
if ((*result_sets)[*num_result_sets] == 0)
break;
(*num_result_sets)++;
+
+ if (empty_term)
+ break;
+ if (!*termp)
+ break;
}
grep_info_delete(&grep_info);
return ZEBRA_OK;
oid_value attributeSet,
NMEM stream,
int reg_type, int complete_flag,
- const char *rank_type, int xpath_use,
+ const char *rank_type,
+ const char *xpath_use,
int num_bases, char **basenames,
NMEM rset_nmem,
RSET *rset,
NMEM stream,
int reg_type, int complete_flag,
const char *rank_type,
- int xpath_use,
+ const char *xpath_use,
int num_bases, char **basenames,
NMEM rset_nmem,
RSET *rset,
NMEM stream,
int reg_type, int complete_flag,
const char *rank_type,
- int xpath_use,
+ const char *xpath_use,
int num_bases, char **basenames,
NMEM rset_nmem,
RSET *rset,
char *term_tmp = term_dict + strlen(term_dict);
*error_code = 0;
- attr_init(&relation, zapt, 2);
+ attr_init_APT(&relation, zapt, 2);
relation_value = attr_find(&relation, NULL);
yaz_log(log_level_rpn, "numeric relation value=%d", relation_value);
struct grep_info *grep_info,
int reg_type, int complete_flag,
int num_bases, char **basenames,
- char *term_dst, int xpath_use, NMEM stream)
+ char *term_dst,
+ const char *xpath_use,
+ NMEM stream)
{
char term_dict[2*IT_MAX_WORD+2];
- int r, base_no;
- AttrType use;
- int use_value;
- const char *use_string = 0;
+ int base_no;
oid_value curAttributeSet = attributeSet;
const char *termp;
struct rpn_char_map_info rcmi;
int bases_ok = 0; /* no of databases with OK attribute */
rpn_char_map_prepare (zh->reg, reg_type, &rcmi);
- attr_init(&use, zapt, 1);
- use_value = attr_find_ex(&use, &curAttributeSet, &use_string);
-
- if (use_value == -1)
- use_value = 1016;
for (base_no = 0; base_no < num_bases; base_no++)
{
- attent attp;
- data1_local_attribute id_xpath_attr;
- data1_local_attribute *local_attr;
int max_pos, prefix_len = 0;
int relation_error = 0;
+ int ord, ord_len, i;
+ char ord_buf[32];
termp = *term_sub;
- if (use_value == -2) /* string attribute (assume IDXPATH/any) */
- {
- use_value = xpath_use;
- attp.local_attributes = &id_xpath_attr;
- attp.attset_ordinal = VAL_IDXPATH;
- id_xpath_attr.next = 0;
- id_xpath_attr.local = use_value;
- }
- else if (curAttributeSet == VAL_IDXPATH)
- {
- attp.local_attributes = &id_xpath_attr;
- attp.attset_ordinal = VAL_IDXPATH;
- id_xpath_attr.next = 0;
- id_xpath_attr.local = use_value;
- }
- else
- {
- if ((r = att_getentbyatt (zh, &attp, curAttributeSet, use_value,
- use_string)))
- {
- yaz_log(YLOG_DEBUG, "att_getentbyatt fail. set=%d use=%d r=%d",
- curAttributeSet, use_value, r);
- if (r == -1)
- {
- if (use_string)
- zebra_setError(zh,
- YAZ_BIB1_UNSUPP_USE_ATTRIBUTE,
- use_string);
- else
- zebra_setError_zint(zh, YAZ_BIB1_UNSUPP_USE_ATTRIBUTE,
- use_value);
- }
- else
- zebra_setError(zh, YAZ_BIB1_UNSUPP_ATTRIBUTE_SET, 0);
- continue;
- }
- }
+
if (zebraExplain_curDatabase (zh->reg->zei, basenames[base_no]))
{
zebra_setError(zh, YAZ_BIB1_DATABASE_UNAVAILABLE,
basenames[base_no]);
return ZEBRA_FAIL;
}
- for (local_attr = attp.local_attributes; local_attr;
- local_attr = local_attr->next)
- {
- int ord;
- char ord_buf[32];
- int i, ord_len;
-
- ord = zebraExplain_lookup_attr_su(zh->reg->zei,
- reg_type,
- attp.attset_ordinal,
- local_attr->local);
- if (ord < 0)
- continue;
- if (prefix_len)
- term_dict[prefix_len++] = '|';
- else
- term_dict[prefix_len++] = '(';
- ord_len = key_SU_encode (ord, ord_buf);
- for (i = 0; i<ord_len; i++)
- {
- term_dict[prefix_len++] = 1;
- term_dict[prefix_len++] = ord_buf[i];
- }
+ if (zebra_apt_get_ord(zh, zapt, reg_type, xpath_use,
+ curAttributeSet, &ord)
+ != ZEBRA_OK)
+ {
+ break;
}
- if (!prefix_len)
+
+ if (prefix_len)
+ term_dict[prefix_len++] = '|';
+ else
+ term_dict[prefix_len++] = '(';
+
+ ord_len = key_SU_encode (ord, ord_buf);
+ for (i = 0; i < ord_len; i++)
{
- zebra_setError_zint(zh, YAZ_BIB1_UNSUPP_USE_ATTRIBUTE, use_value);
- continue;
+ term_dict[prefix_len++] = 1;
+ term_dict[prefix_len++] = ord_buf[i];
}
bases_ok++;
term_dict[prefix_len++] = ')';
oid_value attributeSet,
NMEM stream,
int reg_type, int complete_flag,
- const char *rank_type, int xpath_use,
+ const char *rank_type,
+ const char *xpath_use,
int num_bases, char **basenames,
NMEM rset_nmem,
RSET *rset,
oident oe;
char termz[20];
- attr_init(&sort_relation_type, zapt, 7);
+ attr_init_APT(&sort_relation_type, zapt, 7);
sort_relation_value = attr_find(&sort_relation_type, &attributeSet);
if (!sort_sequence->specs)
AttrType use;
const char *use_string = 0;
- attr_init(&use, zapt, 1);
+ attr_init_APT(&use, zapt, 1);
attr_find_ex(&use, &curAttributeSet, &use_string);
if (!use_string || *use_string != '/')
static RSET xpath_trunc(ZebraHandle zh, NMEM stream,
- int reg_type, const char *term, int use,
+ int reg_type, const char *term,
+ const char *xpath_use,
oid_value curAttributeSet, NMEM rset_nmem,
struct rset_key_control *kc)
{
char term_dict[2048];
char ord_buf[32];
int prefix_len = 0;
- int ord = zebraExplain_lookup_attr_su(zh->reg->zei, reg_type,
- curAttributeSet, use);
+ int ord = zebraExplain_lookup_attr_str(zh->reg->zei, reg_type,
+ xpath_use);
int ord_len, i, r, max_pos;
int term_type = Z_Term_characterString;
const char *flags = "void";
}
wrbuf_puts(wbuf, "");
rset_attr = xpath_trunc(
- zh, stream, '0', wrbuf_buf(wbuf), 3,
+ zh, stream, '0', wrbuf_buf(wbuf), ZEBRA_XPATH_ATTR_NAME,
curAttributeSet, rset_nmem, kc);
wrbuf_free(wbuf, 1);
}
if (strlen(xpath_rev))
{
rset_start_tag = xpath_trunc(zh, stream, '0',
- xpath_rev, 1, curAttributeSet, rset_nmem, kc);
+ xpath_rev,
+ ZEBRA_XPATH_ELM_BEGIN,
+ curAttributeSet,
+ rset_nmem, kc);
rset_end_tag = xpath_trunc(zh, stream, '0',
- xpath_rev, 2, curAttributeSet, rset_nmem, kc);
+ xpath_rev,
+ ZEBRA_XPATH_ELM_END,
+ curAttributeSet,
+ rset_nmem, kc);
rset = rsbetween_create(rset_nmem, kc, kc->scope,
rset_start_tag, rset,
int sort_flag;
char termz[IT_MAX_WORD+1];
int xpath_len;
- int xpath_use = 0;
+ const char *xpath_use = 0;
struct xpath_location_step xpath[10];
if (!log_level_set)
xpath_len = parse_xpath(zh, zapt, attributeSet, xpath, 10, stream);
if (xpath_len >= 0)
{
- xpath_use = 1016; /* searching for element by default */
if (xpath[xpath_len-1].part[0] == '@')
- xpath_use = 1015; /* last step an attribute .. */
+ xpath_use = ZEBRA_XPATH_ATTR_CDATA; /* last step is attribute */
+ else
+ xpath_use = ZEBRA_XPATH_CDATA; /* searching for cdata */
}
/* search using one of the various search type strategies
num_bases, basenames, rset_nmem,
rset, kc);
}
+ else if (!strcmp(search_type, "always"))
+ {
+ *termz = '\0';
+ res = rpn_search_APT_phrase(zh, zapt, termz, attributeSet, stream,
+ reg_id, complete_flag, rank_type,
+ xpath_use,
+ num_bases, basenames, rset_nmem,
+ rset, kc);
+ }
else
{
zebra_setError(zh, YAZ_BIB1_UNSUPP_STRUCTURE_ATTRIBUTE, 0);
int errCode = 0; /* err code (if any is not OK) */
char *errString = 0; /* addinfo */
- unsigned reg_id;
+ unsigned index_type;
char *search_type = NULL;
char rank_type[128];
int complete_flag;
AttrType termset;
int termset_value_numeric;
const char *termset_value_string;
- attr_init(&termset, zapt, 8);
+ attr_init_APT(&termset, zapt, 8);
termset_value_numeric =
attr_find_ex(&termset, NULL, &termset_value_string);
if (termset_value_numeric != -1)
yaz_log(YLOG_DEBUG, "position = %d, num = %d set=%d",
pos, num, attributeset);
- attr_init(&use, zapt, 1);
+ attr_init_APT(&use, zapt, 1);
use_value = attr_find_ex(&use, &attributeset, &use_string);
- if (zebra_maps_attr(zh->reg->zebra_maps, zapt, ®_id, &search_type,
+ if (zebra_maps_attr(zh->reg->zebra_maps, zapt, &index_type, &search_type,
rank_type, &complete_flag, &sort_flag))
{
*num_entries = 0;
use_value = 1016;
for (base_no = 0; base_no < num_bases && ord_no < 32; base_no++)
{
- data1_local_attribute *local_attr;
- attent attp;
int ord;
if (zebraExplain_curDatabase (zh->reg->zei, basenames[base_no]))
return ZEBRA_FAIL;
}
- if (use_string &&
- (ord = zebraExplain_lookup_attr_str(zh->reg->zei, reg_id,
- use_string)) >= 0)
- {
- /* we have a match for a raw string attribute */
- if (ord > 0)
- ords[ord_no++] = ord;
- attp.local_attributes = 0; /* no more attributes */
- }
- else
- {
- int r;
-
- if ((r = att_getentbyatt (zh, &attp, attributeset, use_value,
- use_string)))
- {
- yaz_log(YLOG_DEBUG, "att_getentbyatt fail. set=%d use=%d",
- attributeset, use_value);
- if (r == -1)
- {
- errCode = YAZ_BIB1_UNSUPP_USE_ATTRIBUTE;
- if (use_string)
- zebra_setError(zh, YAZ_BIB1_UNSUPP_USE_ATTRIBUTE,
- use_string);
- else
- zebra_setError_zint(zh, YAZ_BIB1_UNSUPP_USE_ATTRIBUTE,
- use_value);
- }
- else
- {
- zebra_setError(zh, YAZ_BIB1_UNSUPP_ATTRIBUTE_SET, 0);
- }
- continue;
- }
- }
- bases_ok++;
- for (local_attr = attp.local_attributes; local_attr && ord_no < 32;
- local_attr = local_attr->next)
- {
- ord = zebraExplain_lookup_attr_su(zh->reg->zei, reg_id,
- attp.attset_ordinal,
- local_attr->local);
- if (ord > 0)
- ords[ord_no++] = ord;
- }
+ if (zebra_apt_get_ord(zh, zapt, index_type, 0, attributeset, &ord)
+ != ZEBRA_OK)
+ {
+ break;
+ }
+ ords[ord_no++] = ord;
}
if (!bases_ok && errCode)
{
struct scan_info *scan_info = scan_info_array + i;
struct rpn_char_map_info rcmi;
- rpn_char_map_prepare (zh->reg, reg_id, &rcmi);
+ rpn_char_map_prepare (zh->reg, index_type, &rcmi);
scan_info->before = before;
scan_info->after = after;
termz[prefix_len] = 0;
strcpy(scan_info->prefix, termz);
- if (trans_scan_term(zh, zapt, termz+prefix_len, reg_id) == ZEBRA_FAIL)
+ if (trans_scan_term(zh, zapt, termz+prefix_len, index_type) ==
+ ZEBRA_FAIL)
return ZEBRA_FAIL;
dict_scan(zh->reg->dict, termz, &before_tmp, &after_tmp,
if (lo >= 0)
{
/* get result set for first term */
- zebra_term_untrans_iconv(zh, stream->mem, reg_id,
+ zebra_term_untrans_iconv(zh, stream->mem, index_type,
&glist[lo].term, mterm);
rset = rset_trunc(zh, &scan_info_array[j0].list[ptr[j0]].isam_p, 1,
glist[lo].term, strlen(glist[lo].term),
NULL, 0, zapt->term->which, rset_nmem,
- kc, kc->scope, 0, reg_id, 0 /* hits_limit */,
+ kc, kc->scope, 0, index_type, 0 /* hits_limit */,
0 /* term_ref_id_str */);
}
ptr[j0]++; /* move index for this set .. */
glist[lo].term,
strlen(glist[lo].term), NULL, 0,
zapt->term->which,rset_nmem,
- kc, kc->scope, 0, reg_id, 0 /* hits_limit */,
+ kc, kc->scope, 0, index_type, 0 /* hits_limit */,
0 /* term_ref_id_str */ );
rset = rsmulti_or_create(rset_nmem, kc,
kc->scope, 0 /* termid */,
if (j0 == -1)
break;
- zebra_term_untrans_iconv(zh, stream->mem, reg_id,
+ zebra_term_untrans_iconv(zh, stream->mem, index_type,
&glist[lo].term, mterm);
rset = rset_trunc
(zh, &scan_info_array[j0].list[before-1-ptr[j0]].isam_p, 1,
glist[lo].term, strlen(glist[lo].term),
NULL, 0, zapt->term->which, rset_nmem,
- kc, kc->scope, 0, reg_id, 0 /* hits_limit */,
+ kc, kc->scope, 0, index_type, 0 /* hits_limit */,
0 /* term_ref_id_str */);
ptr[j0]++;
glist[lo].term,
strlen(glist[lo].term), NULL, 0,
zapt->term->which, rset_nmem,
- kc, kc->scope, 0, reg_id, 0 /* hits_limit */,
+ kc, kc->scope, 0, index_type, 0 /* hits_limit */,
0 /* term_ref_id_str */);
rset = rsmulti_or_create(rset_nmem, kc,
kc->scope, 0 /* termid */, 2, rsets);
return ZEBRA_OK;
}
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+