X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;ds=sidebyside;f=index%2Findex.h;h=8738d1aa178e80b2aad597647704bcb8e0032dcb;hb=6988ba91e363565638c27a8d5895ad9afc409e75;hp=0cfe657cc241254df443c0a14cdae3875340c22a;hpb=ae5c8868f2bee81cebddf3251432eb47c3da3591;p=idzebra-moved-to-github.git diff --git a/index/index.h b/index/index.h index 0cfe657..8738d1a 100644 --- a/index/index.h +++ b/index/index.h @@ -1,5 +1,5 @@ -/* $Id: index.h,v 1.189 2007-01-05 10:45:11 adam Exp $ - Copyright (C) 1995-2006 +/* $Id: index.h,v 1.199 2007-08-21 11:06:47 adam Exp $ + Copyright (C) 1995-2007 Index Data ApS This file is part of the Zebra server. @@ -198,8 +198,8 @@ struct zebra_session { char *user_perm; char *dbaccesslist; int errCode; - zint hits; char *errString; + int partial_result; #if HAVE_SYS_TIMES_H struct tms tms1; struct tms tms2; @@ -213,6 +213,7 @@ struct zebra_session { zint records_updated; zint records_deleted; zint records_processed; + zint records_skipped; char *record_encoding; yaz_iconv_t iconv_to_utf8; @@ -233,6 +234,9 @@ struct zebra_session { NMEM nmem_error; struct zebra_limit *m_limit; + + int (*break_handler_func)(void *client_data); + void *break_handler_data; }; @@ -257,7 +261,7 @@ void zebra_limit_for_rset(struct zebra_limit *zl, struct rset_key_control *zebra_key_control_create(ZebraHandle zh); ZEBRA_RES rpn_search_top(ZebraHandle zh, Z_RPNStructure *zs, - oid_value attributeSet, + const Odr_oid *attributeSet, NMEM stream, NMEM rset_nmem, Z_SortKeySpecList *sort_sequence, int num_bases, char **basenames, @@ -267,7 +271,7 @@ ZEBRA_RES rpn_get_top_approx_limit(ZebraHandle zh, Z_RPNStructure *zs, zint *approx_limit); ZEBRA_RES rpn_scan(ZebraHandle zh, ODR stream, Z_AttributesPlusTerm *zapt, - oid_value attributeset, + const Odr_oid *attributeset, int num_bases, char **basenames, int *position, int *num_entries, ZebraScanEntry **list, int *is_partial, RSET limit_set); @@ -285,8 +289,9 @@ void resultSetAddTerm(ZebraHandle zh, ZebraSet s, int reg_type, ZebraSet resultSetAdd(ZebraHandle zh, const char *name, int ov); ZebraSet resultSetGet(ZebraHandle zh, const char *name); ZEBRA_RES resultSetAddRPN(ZebraHandle zh, NMEM m, Z_RPNQuery *rpn, - int num_bases, char **basenames, - const char *setname); + int num_bases, char **basenames, + const char *setname, + zint *hits, int *estimated_hit_count); RSET resultSetRef(ZebraHandle zh, const char *resultSetId); void resultSetDestroy(ZebraHandle zh, int num_names, char **names, int *statuses); @@ -302,38 +307,39 @@ ZEBRA_RES resultSetRank(ZebraHandle zh, ZebraSet zebraSet, RSET rset, NMEM nmem); void resultSetInvalidate(ZebraHandle zh); -int zebra_record_fetch(ZebraHandle zh, zint sysno, int score, - zebra_snippets *hit_snippet, ODR stream, - oid_value input_format, Z_RecordComposition *comp, - oid_value *output_format, char **rec_bufp, - int *rec_lenp, char **basenamep, - char **addinfo); +int zebra_record_fetch(ZebraHandle zh, const char *setname, + zint sysno, int score, + zebra_snippets *hit_snippet, ODR stream, + const Odr_oid *input_format, Z_RecordComposition *comp, + const Odr_oid **output_format, char **rec_bufp, + int *rec_lenp, char **basenamep, + char **addinfo); void extract_get_fname_tmp(ZebraHandle zh, char *fname, int no); +void extract_snippet(ZebraHandle zh, zebra_snippets *sn, + struct ZebraRecStream *stream, RecType rt, + void *recTypeClientData); + void zebra_index_merge(ZebraHandle zh); ZEBRA_RES zebra_buffer_extract_record(ZebraHandle zh, const char *buf, size_t buf_size, - int delete_flag, + enum zebra_recctrl_action_t action, int test_mode, const char *recordType, zint *sysno, const char *match_criteria, - const char *fname, - int force_update, - int allow_update); + const char *fname); ZEBRA_RES zebra_extract_record_stream(ZebraHandle zh, struct ZebraRecStream *stream, - int delete_flag, + enum zebra_recctrl_action_t action, int test_mode, const char *recordType, zint *sysno, const char *match_criteria, const char *fname, - int force_update, - int allow_update, RecType recType, void *recTypeClientData, int *more); @@ -378,14 +384,14 @@ ZEBRA_RES zebra_apt_get_ord(ZebraHandle zh, Z_AttributesPlusTerm *zapt, int index_type, const char *xpath_use, - oid_value curAttributeSet, + const Odr_oid *curAttributeSet, int *ord); ZEBRA_RES zebra_attr_list_get_ord(ZebraHandle zh, Z_AttributeList *attr_list, zinfo_index_category_t cat, int index_type, - oid_value curAttributeSet, + const Odr_oid *curAttributeSet, int *ord); ZEBRA_RES zebra_sort_get_ord(ZebraHandle zh, @@ -411,6 +417,8 @@ ZEBRA_RES zapt_term_to_utf8(ZebraHandle zh, Z_AttributesPlusTerm *zapt, char *termz); +void zebra_set_partial_result(ZebraHandle zh); + int zebra_check_res(Res res); #define FIRST_IN_FIELD_STR "\001^"