Fixed bug #685: Optimize xelm/melm matching. Indexing the Koha collection
[idzebra-moved-to-github.git] / include / zebraapi.h
index 4488047..4ae3541 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: zebraapi.h,v 1.14 2004-08-04 08:35:23 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>
@@ -62,7 +63,7 @@ typedef struct {
     int len;             /* length */
     oid_value format;    /* record syntax */
     char *base; 
-    SYSNO sysno;
+    int  sysno;
     int  score;
 } ZebraRetrievalRecord;
 
@@ -187,40 +188,40 @@ 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,
-                        SYSNO *sysno, const char *match, const char *fname,
+                        int *sysno, const char *match, const char *fname,
                         const char *buf, int buf_size,
                         int force_update);
-int zebra_update_record (ZebraHandle zh, 
+YAZ_EXPORT int zebra_update_record (ZebraHandle zh, 
                         const char *recordType,
-                        SYSNO *sysno, const char *match, const char *fname,
+                        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,
-                        SYSNO *sysno, const char *match, const char *fname,
+                        int *sysno, const char *match, const char *fname,
                         const char *buf, int buf_size,
                         int force_update);
 
@@ -229,11 +230,11 @@ YAZ_EXPORT int zebra_resultSetTerms (ZebraHandle zh, const char *setname,
                                      int *type, char *out, size_t *len);
 
 YAZ_EXPORT int 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);
+                            int num_input_setnames,
+                            const char **input_setnames,
+                            const char *output_setname,
+                            Z_SortKeySpecList *sort_sequence,
+                            int *sort_status);
 
 YAZ_EXPORT
 int zebra_select_databases (ZebraHandle zh, int num_bases,