Charmap work
[idzebra-moved-to-github.git] / index / zserver.c
index c3ea6b4..faae520 100644 (file)
@@ -1,10 +1,22 @@
 /*
- * Copyright (C) 1994-1995, Index Data I/S 
+ * Copyright (C) 1995-1996, Index Data I/S 
  * All rights reserved.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: zserver.c,v $
- * Revision 1.36  1996-05-01 13:46:37  adam
+ * Revision 1.40  1996-06-04 10:19:02  adam
+ * Minor changes - removed include of ctype.h.
+ *
+ * Revision 1.39  1996/05/31  09:07:05  quinn
+ * Work on character-set handling
+ *
+ * Revision 1.38  1996/05/14  11:34:01  adam
+ * Scan support in multiple registers/databases.
+ *
+ * Revision 1.37  1996/05/14  06:16:48  adam
+ * Compact use/set bytes used in search service.
+ *
+ * Revision 1.36  1996/05/01 13:46:37  adam
  * First work on multiple records in one file.
  * New option, -offset, to the "unread" command in the filter module.
  *
@@ -176,6 +188,7 @@ static int register_lock (ZServerInfo *zi)
     zi->registerChange = lastChange;
     if (zi->records)
     {
+        zebTargetInfo_close (zi->zti, 0);
         dict_close (zi->wordDict);
         is_close (zi->wordIsam);
         rec_close (&zi->records);
@@ -188,6 +201,8 @@ static int register_lock (ZServerInfo *zi)
     if (!(zi->wordIsam = is_open (FNAME_WORD_ISAM, key_compare, 0,
                                   sizeof (struct it_key))))
         return -1;
+    zi->zti = zebTargetInfo_open (zi->records, 0);
+    init_charmap ();
     return 0;
 }
 
@@ -261,7 +276,7 @@ bend_searchresult *bend_search (void *handle, bend_searchrequest *q, int *fd)
     logf (LOG_LOG, "ResultSet '%s'", q->setname);
     switch (q->query->which)
     {
-    case Z_Query_type_1:
+    case Z_Query_type_1: case Z_Query_type_101:
         r.errcode = rpn_search (&server_info, q->query->u.type_1,
                                 q->num_bases, q->basenames, q->setname,
                                 &r.hits);
@@ -446,6 +461,7 @@ bend_scanresult *bend_scan (void *handle, bend_scanrequest *q, int *num)
     r.term_position = q->term_position;
     r.num_entries = q->num_entries;
     r.errcode = rpn_scan (&server_info, q->term,
+                          q->attributeset,
                           q->num_bases, q->basenames,
                           &r.term_position,
                           &r.num_entries, &r.entries, &status);