X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=index%2Findex.h;h=a147563fbcc57bb0b1df9a029dc7714c5cdee662;hp=3fd1a753f5346920cb6755d660607202cf522554;hb=c33ea56e3771c3b80ba66ef8fda3a09cad171ebb;hpb=4478d785b7769691261005c98063b98a5a5971b3 diff --git a/index/index.h b/index/index.h index 3fd1a75..a147563 100644 --- a/index/index.h +++ b/index/index.h @@ -1,4 +1,4 @@ -/* $Id: index.h,v 1.171 2006-08-14 10:40:15 adam Exp $ +/* $Id: index.h,v 1.175 2006-09-08 14:40:52 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -46,6 +46,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "zinfo.h" #include #include +#include YAZ_BEGIN_CDECL @@ -242,6 +243,7 @@ struct zebra_session { int shadow_enable; int m_staticrank; + int m_segment_indexing; zint records_inserted; zint records_updated; @@ -361,6 +363,19 @@ ZEBRA_RES zebra_buffer_extract_record(ZebraHandle zh, int force_update, int allow_update); +ZEBRA_RES zebra_extract_record_stream(ZebraHandle zh, + struct ZebraRecStream *stream, + int delete_flag, + int test_mode, + const char *recordType, + SYSNO *sysno, + const char *match_criteria, + const char *fname, + int force_update, + int allow_update, + RecType recType, + void *recTypeClientData); + #if 0 int extract_rec_in_mem (ZebraHandle zh, const char *recordType, const char *buf, size_t buf_size, @@ -371,23 +386,10 @@ int extract_rec_in_mem (ZebraHandle zh, const char *recordType, #endif void extract_flushWriteKeys (ZebraHandle zh, int final); -struct zebra_fetch_control { - off_t offset_end; - off_t record_offset; - off_t record_int_pos; - const char *record_int_buf; - int record_int_len; - int fd; -}; - -int zebra_record_ext_read (void *fh, char *buf, size_t count); -off_t zebra_record_ext_seek (void *fh, off_t offset); -off_t zebra_record_ext_tell (void *fh); -off_t zebra_record_int_seek (void *fh, off_t offset); -off_t zebra_record_int_tell (void *fh); -int zebra_record_int_read (void *fh, char *buf, size_t count); -void zebra_record_int_end (void *fh, off_t offset); - +YAZ_EXPORT void zebra_create_stream_mem(struct ZebraRecStream *stream, + const char *buf, size_t sz); +YAZ_EXPORT void zebra_create_stream_fd(struct ZebraRecStream *stream, + int fd, off_t start_offset); void print_rec_keys(ZebraHandle zh, zebra_rec_keys_t reckeys); ZEBRA_RES zebra_snippets_rec_keys(ZebraHandle zh, zebra_rec_keys_t reckeys, @@ -451,6 +453,9 @@ ZEBRA_RES zebra_update_file_match(ZebraHandle zh, const char *path); ZEBRA_RES zebra_update_from_path(ZebraHandle zh, const char *path); ZEBRA_RES zebra_delete_from_path(ZebraHandle zh, const char *path); +#define FIRST_IN_FIELD_STR "\001^" +#define FIRST_IN_FIELD_LEN 2 + YAZ_END_CDECL #endif