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
copied from isamc.h, simplifying
[idzebra-moved-to-github.git]
/
index
/
apitest.c
diff --git
a/index/apitest.c
b/index/apitest.c
index
57c2f74
..
9ed3508
100644
(file)
--- a/
index/apitest.c
+++ b/
index/apitest.c
@@
-109,6
+109,8
@@
int main (int argc, char **argv)
nmem_init ();
nmem_init ();
+ log_init_file("apitest.log");
+
odr_input = odr_createmem (ODR_DECODE);
odr_output = odr_createmem (ODR_ENCODE);
odr_input = odr_createmem (ODR_DECODE);
odr_output = odr_createmem (ODR_ENCODE);
@@
-147,7
+149,7
@@
int main (int argc, char **argv)
}
/* result set name will be called 1,2, etc */
}
/* result set name will be called 1,2, etc */
- sprintf (setname, "%d", i);
+ sprintf (setname, "%d", argno);
/* fire up the search */
zebra_search_rpn (zh, odr_input, odr_output, query, 1, &base, setname);
/* fire up the search */
zebra_search_rpn (zh, odr_input, odr_output, query, 1, &base, setname);
@@
-184,7
+186,7
@@
int main (int argc, char **argv)
for (i = 0; i<noOfRecordsToFetch; i++)
records[i].position = i+1;
/* fetch them and request for GRS-1 records */
for (i = 0; i<noOfRecordsToFetch; i++)
records[i].position = i+1;
/* fetch them and request for GRS-1 records */
- zebra_records_retrieve (zh, odr_input, setname, NULL, VAL_GRS1,
+ zebra_records_retrieve (zh, odr_input, setname, NULL, VAL_SUTRS,
noOfRecordsToFetch, records);
/* status ... */
noOfRecordsToFetch, records);
/* status ... */
@@
-218,6
+220,11
@@
int main (int argc, char **argv)
printf (" GRS-1\n");
display_grs1(grs_record, 0);
}
printf (" GRS-1\n");
display_grs1(grs_record, 0);
}
+ else if (records[i].format == VAL_SUTRS)
+ {
+ printf (" SUTRS\n");
+ printf ("%.*s", records[i].len, records[i].buf);
+ }
/* some other record we don't handle yet... */
else
{
/* some other record we don't handle yet... */
else
{