-/* $Id: zebraapi.c,v 1.109 2003-06-30 19:37:12 adam Exp $
+/* $Id: zebraapi.c,v 1.111 2003-07-07 13:55:37 pop Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003
Index Data Aps
ZebraRetrievalRecord *recs)
{
ZebraPosSet poset;
- int i, *pos_array;
+ int i, *pos_array, ret = 0;
ASSERTZH;
yaz_log(LOG_API,"zebra_records_retrieve n=%d",num_recs);
zh->errCode=0;
{
zh->errCode = 30;
zh->errString = odr_strdup (stream, setname);
- return 1;
+ return -1;
}
zh->errCode = 0;
if (zebra_begin_read (zh))
- return 1;
+ return -1;
pos_array = (int *) xmalloc (num_recs * sizeof(*pos_array));
for (i = 0; i<num_recs; i++)
logf (LOG_DEBUG, "zebraPosSetCreate error");
zh->errCode = 30;
zh->errString = nmem_strdup (stream->mem, setname);
+ ret = -1;
}
else
{
sprintf (num_str, "%d", pos_array[i]);
zh->errCode = 13;
zh->errString = odr_strdup (stream, num_str);
+ ret = -1;
break;
}
}
}
zebra_end_read (zh);
xfree (pos_array);
- return 0;
+ return ret;
}
int zebra_scan (ZebraHandle zh, ODR stream, Z_AttributesPlusTerm *zapt,
odr_destroy(odr);
+ yaz_log(LOG_API,"Hits: %d",numhits);
+
if (numhits)
*numhits=hits;
Sort - a simplified interface, with optional read locks.
FIXME - This is a horrible name, will conflict with half the applications
*/
-int zebra_sort_2 (ZebraHandle zh,
- ODR stream,
- const char *sort_spec,
- const char *output_setname,
- const char **input_setnames)
+int zebra_sort_by_specstr (ZebraHandle zh,
+ ODR stream,
+ const char *sort_spec,
+ const char *output_setname,
+ const char **input_setnames)
{
int num_input_setnames = 0;
int sort_status = 0;