projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Beginnings of facets
[idzebra-moved-to-github.git]
/
index
/
rpnscan.c
diff --git
a/index/rpnscan.c
b/index/rpnscan.c
index
b4e9fa8
..
79b12aa
100644
(file)
--- a/
index/rpnscan.c
+++ b/
index/rpnscan.c
@@
-1,4
+1,4
@@
-/* $Id: rpnscan.c,v 1.18 2007-11-01 14:10:03 adam Exp $
+/* $Id: rpnscan.c,v 1.20 2007-11-01 16:01:33 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
Copyright (C) 1995-2007
Index Data ApS
@@
-41,8
+41,6
@@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define RPN_MAX_ORDS 32
#define RPN_MAX_ORDS 32
-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)
/* convert APT SCAN term to internal cmap */
static ZEBRA_RES trans_scan_term(ZebraHandle zh, Z_AttributesPlusTerm *zapt,
char *termz, zebra_map_t zm)
@@
-280,8
+278,8
@@
static int scan_save_set(ZebraHandle zh, ODR stream, NMEM nmem,
}
return 0;
}
}
return 0;
}
-
-static ZEBRA_RES rpn_scan_ver2(ZebraHandle zh, ODR stream, NMEM nmem,
+
+static ZEBRA_RES rpn_scan_norm(ZebraHandle zh, ODR stream, NMEM nmem,
struct rset_key_control *kc,
Z_AttributesPlusTerm *zapt,
int *position, int *num_entries,
struct rset_key_control *kc,
Z_AttributesPlusTerm *zapt,
int *position, int *num_entries,
@@
-526,7
+524,7
@@
ZEBRA_RES rpn_scan(ZebraHandle zh, ODR stream, Z_AttributesPlusTerm *zapt,
}
}
}
}
}
}
-
+
yaz_log(YLOG_DEBUG, "position = %d, num = %d",
*position, *num_entries);
yaz_log(YLOG_DEBUG, "position = %d, num = %d",
*position, *num_entries);
@@
-542,7
+540,11
@@
ZEBRA_RES rpn_scan(ZebraHandle zh, ODR stream, Z_AttributesPlusTerm *zapt,
zebra_setError(zh, YAZ_BIB1_TOO_MANY_DATABASES_SPECIFIED, 0);
return ZEBRA_FAIL;
}
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;
for (base_no = 0; base_no < num_bases; base_no++)
{
int ord;
@@
-572,7
+574,7
@@
ZEBRA_RES rpn_scan(ZebraHandle zh, ODR stream, Z_AttributesPlusTerm *zapt,
nmem = nmem_create();
kc = zebra_key_control_create(zh);
nmem = nmem_create();
kc = zebra_key_control_create(zh);
- res = rpn_scan_ver2(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);
nmem_destroy(nmem);
list,
is_partial, limit_set, index_type, ord_no, ords);
nmem_destroy(nmem);