-/* $Id: api.h,v 1.47 2007-03-14 11:48:31 adam Exp $
- Copyright (C) 1995-2007
- Index Data ApS
-
-This file is part of the Zebra server.
+/* This file is part of the Zebra server.
+ Copyright (C) 1994-2011 Index Data
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Return codes:
Most functions has return type ZEBRA_RES, where ZEBRA_FAIL indicates
failure; ZEBRA_OK indicates success.
Return codes:
Most functions has return type ZEBRA_RES, where ZEBRA_FAIL indicates
failure; ZEBRA_OK indicates success.
int position; /* position of record in result set (1,2,..) */
char *buf; /* record buffer (void pointer really) */
int len; /* length */
int position; /* position of record in result set (1,2,..) */
char *buf; /* record buffer (void pointer really) */
int len; /* length */
\param configName name of configuration file
\param def_res default resources
\param over_res overriding resources
\param configName name of configuration file
\param def_res default resources
\param over_res overriding resources
This function typically called once in a program. A Zebra Service
acts as a factory for Zebra session handles.
*/
This function typically called once in a program. A Zebra Service
acts as a factory for Zebra session handles.
*/
/** \brief Creates a Zebra session handle within service.
\param zs service handle.
\param res resources to be used for the service (NULL for none)
/** \brief Creates a Zebra session handle within service.
\param zs service handle.
\param res resources to be used for the service (NULL for none)
- with zebra, be that searching or indexing. In simple apps
- one handle is sufficient
+ with zebra, be that searching or indexing. In simple apps
+ one handle is sufficient
Results will be approximiate if hit count is greater than the
limit specified. By default there is a high-limit (no limit).
*/
Results will be approximiate if hit count is greater than the
limit specified. By default there is a high-limit (no limit).
*/
ZEBRA_RES zebra_records_retrieve(ZebraHandle zh, ODR stream,
const char *setname,
Z_RecordComposition *comp,
ZEBRA_RES zebra_records_retrieve(ZebraHandle zh, ODR stream,
const char *setname,
Z_RecordComposition *comp,
\param zh session handle
\param function Z_DeleteResultSetRequest_{list,all}
\param num_setnames number of result sets
\param zh session handle
\param function Z_DeleteResultSetRequest_{list,all}
\param num_setnames number of result sets
This function is used in conjunction with zebra_result_set_term_info.
If operation was successful, ZEBRA_OK is returned; otherwise
ZEBRA_FAIL is returned (typically non-existing setname)
This function is used in conjunction with zebra_result_set_term_info.
If operation was successful, ZEBRA_OK is returned; otherwise
ZEBRA_FAIL is returned (typically non-existing setname)
\param zh session handle
\param setname result set name
\param no the term we want to know about (0=first, 1=second,..)
\param zh session handle
\param setname result set name
\param no the term we want to know about (0=first, 1=second,..)
\param approx about hits: 0=exact,1=approx (output)
\param termbuf buffer for term string (intput, output)
\param termlen size of termbuf (input=max, output=actual length)
\param term_ref_id if non-NULL *term_ref_id holds term reference
\param approx about hits: 0=exact,1=approx (output)
\param termbuf buffer for term string (intput, output)
\param termlen size of termbuf (input=max, output=actual length)
\param term_ref_id if non-NULL *term_ref_id holds term reference
Returns information about one search term associated with result set.
Use zebra_result_set_term_no to read total number of terms associated
with result set. If this function can not return information,
Returns information about one search term associated with result set.
Use zebra_result_set_term_no to read total number of terms associated
with result set. If this function can not return information,
\param zapt Attribute plus Term (start term)
\param attributeset Attributeset for Attribute plus Term
\param position input/output position
\param zapt Attribute plus Term (start term)
\param attributeset Attributeset for Attribute plus Term
\param position input/output position
\param entries list of resulting terms (ODR allocated)
\param is_partial upon return 1=partial, 0=complete
\param setname limit scan by this set (NULL means no limit)
*/
YAZ_EXPORT ZEBRA_RES zebra_scan(ZebraHandle zh, ODR stream,
Z_AttributesPlusTerm *zapt,
\param entries list of resulting terms (ODR allocated)
\param is_partial upon return 1=partial, 0=complete
\param setname limit scan by this set (NULL means no limit)
*/
YAZ_EXPORT ZEBRA_RES zebra_scan(ZebraHandle zh, ODR stream,
Z_AttributesPlusTerm *zapt,
int *position, int *num_entries,
ZebraScanEntry **entries,
int *is_partial,
int *position, int *num_entries,
ZebraScanEntry **entries,
int *is_partial,
\param stream ODR handle for result
\param query PQF scan query
\param position input/output position
\param stream ODR handle for result
\param query PQF scan query
\param position input/output position
\param entries list of resulting terms (ODR allocated)
\param is_partial upon return 1=partial, 0=complete
\param setname limit scan by this set (NULL means no limit)
\param entries list of resulting terms (ODR allocated)
\param is_partial upon return 1=partial, 0=complete
\param setname limit scan by this set (NULL means no limit)
\param input_str input string buffer
\param input_len input string length
\param output_str output string buffer
\param output_len output string length
*/
YAZ_EXPORT
\param input_str input string buffer
\param input_len input string length
\param output_str output string buffer
\param output_len output string length
*/
YAZ_EXPORT
-int zebra_string_norm(ZebraHandle zh, unsigned reg_id, const char *input_str,
+int zebra_string_norm(ZebraHandle zh, const char *index_type,
+ const char *input_str,
int input_len, char *output_str, int output_len);
/** \brief Creates a database
int input_len, char *output_str, int output_len);
/** \brief Creates a database
ZEBRA_RES zebra_admin_import_begin(ZebraHandle zh, const char *database,
const char *record_type);
ZEBRA_RES zebra_admin_import_begin(ZebraHandle zh, const char *database,
const char *record_type);
ZEBRA_RES zebra_begin_trans(ZebraHandle zh, int rw
) ZEBRA_GCC_ATTR((warn_unused_result));
ZEBRA_RES zebra_begin_trans(ZebraHandle zh, int rw
) ZEBRA_GCC_ATTR((warn_unused_result));
ZEBRA_RES zebra_repository_show(ZebraHandle zh, const char *path);
/** \brief Simple update record
ZEBRA_RES zebra_repository_show(ZebraHandle zh, const char *path);
/** \brief Simple update record
/** \brief Updates record
\param zh session handle
\param action (insert,replace,delete or update (replace/insert)
/** \brief Updates record
\param zh session handle
\param action (insert,replace,delete or update (replace/insert)
enum zebra_recctrl_action_t action,
const char *recordType,
zint *sysno, const char *match,
const char *fname,
const char *buf, int buf_size);
enum zebra_recctrl_action_t action,
const char *recordType,
zint *sysno, const char *match,
const char *fname,
const char *buf, int buf_size);
ZEBRA_RES zebra_sort(ZebraHandle zh, ODR stream,
int num_input_setnames,
const char **input_setnames,
const char *output_setname,
Z_SortKeySpecList *sort_sequence,
int *sort_status
ZEBRA_RES zebra_sort(ZebraHandle zh, ODR stream,
int num_input_setnames,
const char **input_setnames,
const char *output_setname,
Z_SortKeySpecList *sort_sequence,
int *sort_status
struct BFiles_struct *zebra_get_bfs(ZebraHandle zh);
YAZ_EXPORT
ZEBRA_RES zebra_set_limit(ZebraHandle zh, int complement_flag, zint *ids);
YAZ_EXPORT
struct BFiles_struct *zebra_get_bfs(ZebraHandle zh);
YAZ_EXPORT
ZEBRA_RES zebra_set_limit(ZebraHandle zh, int complement_flag, zint *ids);
YAZ_EXPORT
* resources. The resources can be viewed as a simple database.
* Resources can be read from a configurtion file, they can be
* read or written by an application. Resources can also be written,
* resources. The resources can be viewed as a simple database.
* Resources can be read from a configurtion file, they can be
* read or written by an application. Resources can also be written,
*
* Zebra has more than one ISAM system. The old and stable ISAM system
* is named isamc (see isamc.h). Another version isams is a write-once
*
* Zebra has more than one ISAM system. The old and stable ISAM system
* is named isamc (see isamc.h). Another version isams is a write-once