# Simple Zebra configuration file
-# $Id: zebra.cfg,v 1.7 2005-05-12 10:16:26 adam Exp $
+# $Id: zebra.cfg,v 1.8 2005-08-09 09:35:25 adam Exp $
#
# Where the schema files, attribute files, etc are located.
profilePath: .:../../tab
perm.anonymous: rw
#rank: zvrank
-#recordId: (bib-1,identifier-standard)
+recordId: (bib-1,title)
+
+database: adam
modulePath: ../../recctrl/.libs
#shadow: shadow:100M
-/* $Id: api.h,v 1.27 2005-06-22 19:42:38 adam Exp $
+/* $Id: api.h,v 1.28 2005-08-09 09:35:25 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
\param num_entries number of terms requested / returned
\param entries list of resulting terms (ODR allocated)
\param is_partial upon return 1=partial, 0=complete
+ \param setname limit scan by this set (NULL means no limit)
*/
YAZ_EXPORT ZEBRA_RES zebra_scan(ZebraHandle zh, ODR stream,
Z_AttributesPlusTerm *zapt,
oid_value attributeset,
int *position, int *num_entries,
ZebraScanEntry **entries,
- int *is_partial);
+ int *is_partial,
+ const char *setname);
/**
\brief performs Scan (taking PQF string)
\param num_entries number of terms requested / returned
\param entries list of resulting terms (ODR allocated)
\param is_partial upon return 1=partial, 0=complete
+ \param setname limit scan by this set (NULL means no limit)
*/
YAZ_EXPORT
ZEBRA_RES zebra_scan_PQF(ZebraHandle zh, ODR stream, const char *query,
int *position, int *num_entries, ZebraScanEntry **entries,
- int *is_partial);
+ int *is_partial, const char *setname);
/**
\brief authenticate user. Returns 0 if OK, != 0 on failure
-/* $Id: zebraapi.c,v 1.179 2005-06-23 06:45:46 adam Exp $
+/* $Id: zebraapi.c,v 1.180 2005-08-09 09:35:25 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
ZEBRA_RES zebra_scan_PQF(ZebraHandle zh, ODR stream, const char *query,
int *position,
int *num_entries, ZebraScanEntry **entries,
- int *is_partial)
+ int *is_partial,
+ const char *setname)
{
YAZ_PQF_Parser pqf_parser = yaz_pqf_create ();
Z_AttributesPlusTerm *zapt;
}
else
res = zebra_scan(zh, stream, zapt, VAL_BIB1,
- position, num_entries, entries, is_partial);
+ position, num_entries, entries, is_partial,
+ setname);
yaz_pqf_destroy (pqf_parser);
return res;
}
oid_value attributeset,
int *position,
int *num_entries, ZebraScanEntry **entries,
- int *is_partial)
+ int *is_partial,
+ const char *setname)
{
ZEBRA_RES res;
+ RSET limit_rset = 0;
ASSERTZH;
assert(stream);
assert(zapt);
*num_entries = 0;
return ZEBRA_FAIL;
}
+ if (setname)
+ {
+ limit_rset = resultSetRef(zh, setname);
+ if (!limit_rset)
+ {
+ zebra_setError(zh,
+ YAZ_BIB1_SPECIFIED_RESULT_SET_DOES_NOT_EXIST,
+ setname);
+ zebra_end_read (zh);
+ return ZEBRA_FAIL;
+ }
+ }
res = rpn_scan (zh, stream, zapt, attributeset,
zh->num_basenames, zh->basenames, position,
- num_entries, entries, is_partial, 0, 0);
+ num_entries, entries, is_partial, limit_rset, 0);
zebra_end_read (zh);
return res;
}
-/* $Id: zserver.c,v 1.137 2005-06-22 19:42:38 adam Exp $
+/* $Id: zserver.c,v 1.138 2005-08-09 09:35:25 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
res = zebra_scan(zh, r->stream, r->term,
r->attributeset,
&r->term_position,
- &r->num_entries, &entries, &is_partial);
+ &r->num_entries, &entries, &is_partial,
+ 0 /* setname */);
if (res == ZEBRA_OK)
{
if (is_partial)
-/* $Id: testlib.c,v 1.23 2005-06-14 20:28:54 adam Exp $
+/* $Id: testlib.c,v 1.24 2005-08-09 09:35:26 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
yaz_log(log_level, "======================================");
yaz_log(log_level, "scan[%d]: pos=%d num=%d %s", lineno, pos, num, query);
- res = zebra_scan_PQF(zh, odr, query, &pos, &num, &entries, &partial);
+ res = zebra_scan_PQF(zh, odr, query, &pos, &num, &entries, &partial,
+ 0 /* setname */);
if (res != ZEBRA_OK)
{
printf("Error: scan returned %d (FAIL), but no error was expected\n"