X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Findex.h;h=3fb6b1de87efc170510ddef1846c5ff149aee58f;hb=18e6d4befe9117cc44003fc9c1e62aac14d4e3bb;hp=1bb24f1469f9ab6faea31dd41a9bc7e449b2feaa;hpb=b88909df16157ed1e7859bc3fad6b01520d4865e;p=idzebra-moved-to-github.git diff --git a/index/index.h b/index/index.h index 1bb24f1..3fb6b1d 100644 --- a/index/index.h +++ b/index/index.h @@ -1,5 +1,5 @@ -/* $Id: index.h,v 1.167 2006-06-13 12:02:08 adam Exp $ - Copyright (C) 1995-2005 +/* $Id: index.h,v 1.177 2006-09-21 08:39:14 adam Exp $ + Copyright (C) 1995-2006 Index Data ApS This file is part of the Zebra server. @@ -15,9 +15,9 @@ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Zebra; see the file LICENSE.zebra. If not, write to the -Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ #ifndef INDEX_H @@ -46,6 +46,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "zinfo.h" #include #include +#include YAZ_BEGIN_CDECL @@ -104,6 +105,7 @@ int key_compare (const void *p1, const void *p2); void key_init(struct it_key *k); char *key_print_it (const void *p, char *buf); zint key_get_seq (const void *p); +zint key_get_segment (const void *p); int key_compare_it (const void *p1, const void *p2); int key_qsort_compare (const void *p1, const void *p2); void key_logdump (int mask, const void *p); @@ -125,7 +127,7 @@ int key_SU_code (int ch, char *out); #define FNAME_CONFIG "zebra.cfg" #define GMATCH_DICT "gmatch" -#define FMATCH_DICT "fmatch" +#define FMATCH_DICT "fmatch%d" struct strtab *strtab_mk (void); int strtab_src (struct strtab *t, const char *name, void ***infop); @@ -241,6 +243,7 @@ struct zebra_session { int shadow_enable; int m_staticrank; + int m_segment_indexing; zint records_inserted; zint records_updated; @@ -360,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, @@ -370,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, @@ -436,6 +439,7 @@ ZEBRA_RES zebra_apt_get_ord(ZebraHandle zh, ZEBRA_RES zebra_attr_list_get_ord(ZebraHandle zh, Z_AttributeList *attr_list, + zinfo_index_category_t cat, int index_type, oid_value curAttributeSet, int *ord); @@ -448,6 +452,24 @@ ZEBRA_RES zebra_sort_get_ord(ZebraHandle zh, 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); +ZEBRA_RES zebra_remove_file_match(ZebraHandle zh); + + +struct rpn_char_map_info +{ + ZebraMaps zm; + int reg_type; +}; + +void rpn_char_map_prepare(struct zebra_register *reg, int reg_type, + struct rpn_char_map_info *map_info); + +ZEBRA_RES zapt_term_to_utf8(ZebraHandle zh, Z_AttributesPlusTerm *zapt, + char *termz); + + +#define FIRST_IN_FIELD_STR "\001^" +#define FIRST_IN_FIELD_LEN 2 YAZ_END_CDECL