Fixed bug #685: Optimize xelm/melm matching. Indexing the Koha collection
[idzebra-moved-to-github.git] / include / zebraapi.h
index 65faace..4ae3541 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: zebraapi.h,v 1.12 2004-01-22 11:27:21 adam Exp $
+/* $Id: zebraapi.h,v 1.13.2.3 2006-08-14 10:38:56 adam Exp $
    Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
    Index Data Aps
 
@@ -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
+
 */
 
 /* Return codes:
@@ -29,6 +29,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #ifndef ZEBRAAPI_H
 #define ZEBRAAPI_H
 
+#include <yaz/log.h>
 #include <yaz/odr.h>
 #include <yaz/oid.h>
 #include <yaz/proto.h>
@@ -82,8 +83,9 @@ typedef struct zebra_service *ZebraService;
 
 /* Start Zebra using file 'configName' (usually zebra.cfg) */
 /* There should be exactly one ZebraService */
-YAZ_EXPORT ZebraService zebra_start (const char *configName,
-                                    Res def_res, Res over_res);
+YAZ_EXPORT ZebraService zebra_start (const char *configName);
+YAZ_EXPORT ZebraService zebra_start_res (const char *configName,
+                                        Res def_res, Res over_res);
 
 /* Close the whole Zebra */
 YAZ_EXPORT int zebra_stop (ZebraService zs);
@@ -186,37 +188,38 @@ YAZ_EXPORT int zebra_admin_import_segment (ZebraHandle zh,
 
 YAZ_EXPORT int zebra_admin_import_end (ZebraHandle zh);
 
-int zebra_admin_exchange_record (ZebraHandle zh,
+YAZ_EXPORT int zebra_admin_exchange_record (ZebraHandle zh,
                                  const char *rec_buf,
                                  size_t rec_len,
                                  const char *recid_buf, size_t recid_len,
                                  int action);
 
-int zebra_begin_trans (ZebraHandle zh, int rw);
-int zebra_end_trans (ZebraHandle zh);
-int zebra_end_transaction (ZebraHandle zh, ZebraTransactionStatus *stat);
+YAZ_EXPORT int zebra_begin_trans (ZebraHandle zh, int rw);
+YAZ_EXPORT int zebra_end_trans (ZebraHandle zh);
+YAZ_EXPORT int zebra_end_transaction (ZebraHandle zh, ZebraTransactionStatus *stat);
 
-int zebra_commit (ZebraHandle zh);
-int zebra_clean (ZebraHandle zh);
+YAZ_EXPORT int zebra_commit (ZebraHandle zh);
+YAZ_EXPORT int zebra_clean (ZebraHandle zh);
 
-int zebra_init (ZebraHandle zh);
-int zebra_compact (ZebraHandle zh);
-int zebra_repository_update (ZebraHandle zh, const char *path);
-int zebra_repository_delete (ZebraHandle zh, const char *path);
-int zebra_repository_show (ZebraHandle zh, const char *path);
+YAZ_EXPORT int zebra_init (ZebraHandle zh);
+YAZ_EXPORT int zebra_compact (ZebraHandle zh);
+YAZ_EXPORT int zebra_repository_update (ZebraHandle zh, const char *path);
+YAZ_EXPORT int zebra_repository_delete (ZebraHandle zh, const char *path);
+YAZ_EXPORT int zebra_repository_show (ZebraHandle zh, const char *path);
 
-int zebra_add_record (ZebraHandle zh, const char *buf, int buf_size);
+YAZ_EXPORT int zebra_add_record (ZebraHandle zh, const char *buf, int buf_size);
                               
-int zebra_insert_record (ZebraHandle zh, 
+YAZ_EXPORT int zebra_insert_record (ZebraHandle zh, 
                         const char *recordType,
                         int *sysno, const char *match, const char *fname,
-                        const char *buf, int buf_size);
-int zebra_update_record (ZebraHandle zh, 
+                        const char *buf, int buf_size,
+                        int force_update);
+YAZ_EXPORT int zebra_update_record (ZebraHandle zh, 
                         const char *recordType,
                         int* sysno, const char *match, const char *fname,
                         const char *buf, int buf_size,
                         int force_update);
-int zebra_delete_record (ZebraHandle zh, 
+YAZ_EXPORT int zebra_delete_record (ZebraHandle zh, 
                         const char *recordType,
                         int *sysno, const char *match, const char *fname,
                         const char *buf, int buf_size,
@@ -233,7 +236,6 @@ YAZ_EXPORT int zebra_sort (ZebraHandle zh, ODR stream,
                             Z_SortKeySpecList *sort_sequence,
                             int *sort_status);
 
-
 YAZ_EXPORT
 int zebra_select_databases (ZebraHandle zh, int num_bases, 
                             const char **basenames);