added first examples of ICU transliterator token normalization
[pazpar2-moved-to-github.git] / src / client.c
index e9bdbb9..0fd5706 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: client.c,v 1.1 2007-04-23 21:05:23 adam Exp $
+/* $Id: client.c,v 1.3 2007-05-10 11:46:09 adam Exp $
    Copyright (c) 2006-2007, Index Data.
 
 This file is part of Pazpar2.
@@ -66,7 +66,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "connection.h"
 #include "settings.h"
 
-// Represents client state for a connection to one search target
+/** \brief Represents client state for a connection to one search target */
 struct client {
     struct session_database *database;
     struct connection *connection;
@@ -75,10 +75,10 @@ struct client {
     int hits;
     int records;
     int setno;
-    int requestid;              // ID of current outstanding request
+    int requestid;            // ID of current outstanding request
     int diagnostic;
     enum client_state state;
-    struct client *next;
+    struct client *next;     // next client in session or next in free list
 };
 
 static const char *client_states[] = {
@@ -632,8 +632,9 @@ int client_parse_query(struct client *cl, const char *query)
         // Initialize relevance structure with query terms
         char *p[512];
         extract_terms(se->nmem, cn, p);
-        se->relevance = relevance_create(se->nmem, (const char **) p,
-                se->expected_maxrecs);
+        se->relevance = relevance_create(client_get_database(cl)->pct,
+                                         se->nmem, (const char **) p,
+                                         se->expected_maxrecs);
     }
 
     ccl_rpn_delete(cn);