X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=index%2Fzebraapi.c;h=adc9b6a02df676ffaba957cc6e4dc7df51b25d34;hb=f3f94568869a1ae0402bfa4f0dea4d80b09695df;hp=f656af4c072514901bbac761f718b850af978b9c;hpb=99b29133f76df10f9dc617a6b2ed876dded7ce52;p=idzebra-moved-to-github.git diff --git a/index/zebraapi.c b/index/zebraapi.c index f656af4..adc9b6a 100644 --- a/index/zebraapi.c +++ b/index/zebraapi.c @@ -423,6 +423,10 @@ struct zebra_register *zebra_register_open(ZebraService zs, const char *name, if (zebra_maps_read_file(reg->zebra_maps, index_fname) != ZEBRA_OK) ret = ZEBRA_FAIL; } + else + { + zebra_maps_define_default_sort(reg->zebra_maps); + } } if (!(reg->records = rec_open(reg->bfs, rw, record_compression))) @@ -1132,7 +1136,7 @@ ZEBRA_RES zebra_records_retrieve(ZebraHandle zh, ODR stream, recs[i].len = 0; recs[i].buf = 0; recs[i].base = 0; - recs[i].sysno = poset[i].term; + recs[i].sysno = poset[i].sysno; if (poset[i].term) { recs[i].format = yaz_oid_recsyn_sutrs; @@ -1433,12 +1437,25 @@ int delete_w_handle(const char *info, void *handle) return 0; } -static int delete_SU_handle(void *handle, int ord) +static int delete_SU_handle(void *handle, int ord, + const char *index_type, const char *string_index, + zinfo_index_category_t cat) { ZebraHandle zh = (ZebraHandle) handle; char ord_buf[20]; int ord_len; - +#if 0 + const char *index_type = 0; + const char *db = 0; + const char *string_index = 0; + zebraExplain_lookup_ord(zh->reg->zei, ord, + &index_type, &db, &string_index); + yaz_log(YLOG_LOG, + "delete_SU_handle:: ord=%d index_type=%s db=%s string_index=%s", + ord, index_type, db, string_index); +#endif + yaz_log(YLOG_LOG, "ord=%d index_type=%s index=%s cat=%d", ord, + index_type, string_index, (int) cat); ord_len = key_SU_encode(ord, ord_buf); ord_buf[ord_len] = '\0';