-/* $Id: rpnscan.c,v 1.19 2007-11-01 14:56:07 adam Exp $
+/* $Id: rpnscan.c,v 1.20 2007-11-01 16:01:33 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
#define RPN_MAX_ORDS 32
-static int log_scan = YLOG_LOG;
-
/* convert APT SCAN term to internal cmap */
static ZEBRA_RES trans_scan_term(ZebraHandle zh, Z_AttributesPlusTerm *zapt,
char *termz, zebra_map_t zm)
}
}
}
-
+
yaz_log(YLOG_DEBUG, "position = %d, num = %d",
*position, *num_entries);
zebra_setError(zh, YAZ_BIB1_TOO_MANY_DATABASES_SPECIFIED, 0);
return ZEBRA_FAIL;
}
-
+ if (sort_flag)
+ {
+ return rpn_facet(zh, stream, zapt, attributeset, position, num_entries,
+ list, is_partial, limit_set);
+ }
for (base_no = 0; base_no < num_bases; base_no++)
{
int ord;
nmem = nmem_create();
kc = zebra_key_control_create(zh);
- if (sort_flag)
- res = rpn_facet(zh, stream, nmem, kc, zapt, position, num_entries,
+ res = rpn_scan_norm(zh, stream, nmem, kc, zapt, position, num_entries,
list,
is_partial, limit_set, index_type, ord_no, ords);
- else
- res = rpn_scan_norm(zh, stream, nmem, kc, zapt, position, num_entries,
- list,
- is_partial, limit_set, index_type, ord_no, ords);
nmem_destroy(nmem);
(*kc->dec)(kc);
return res;