-/* $Id: logic.c,v 1.34 2007-06-01 10:38:08 adam Exp $
+/* $Id: logic.c,v 1.40 2007-06-11 12:08:23 adam Exp $
Copyright (c) 2006-2007, Index Data.
This file is part of Pazpar2.
#include "settings.h"
#include "normalize7bit.h"
+#define TERMLIST_HIGH_SCORE 25
+
#define MAX_CHUNK 15
// Note: Some things in this structure will eventually move to configuration
{
"",
"",
- "",
- "",
+ "",
0,
0, /* dump_records */
0, /* debug_mode */
s->termlists[i].name = nmem_strdup(s->nmem, type);
s->termlists[i].termlist
- = termlist_create(s->nmem, s->expected_maxrecs, 15);
+ = termlist_create(s->nmem, s->expected_maxrecs,
+ TERMLIST_HIGH_SCORE);
s->num_termlists = i + 1;
}
termlist_insert(s->termlists[i].termlist, value);
}
for (cl = se->clients; cl; cl = client_next_in_session(cl))
- {
client_prep_connection(cl);
- }
return 0;
}
http_set_proxyaddr(hp, ser->myurl ? ser->myurl : "");
}
-void start_zproxy(void)
-{
- struct conf_server *ser = global_parameters.server;
-
- if (*global_parameters.zproxy_override){
- yaz_log(YLOG_LOG, "Z39.50 proxy %s",
- global_parameters.zproxy_override);
- return;
- }
-
- else if (ser->zproxy_host || ser->zproxy_port)
- {
- char hp[128] = "";
-
- strcpy(hp, ser->zproxy_host ? ser->zproxy_host : "");
- if (ser->zproxy_port)
- {
- if (*hp)
- strcat(hp, ":");
- else
- strcat(hp, "@:");
-
- sprintf(hp + strlen(hp), "%d", ser->zproxy_port);
- }
- strcpy(global_parameters.zproxy_override, hp);
- yaz_log(YLOG_LOG, "Z39.50 proxy %s",
- global_parameters.zproxy_override);
-
- }
- else
- return;
-}
// Master list of connections we're handling events to
static IOCHAN channel_list = 0;
}
record = record_create(se->nmem,
- service->num_metadata, service->num_sortkeys);
- record_assign_client(record, cl);
+ service->num_metadata, service->num_sortkeys, cl);
mergekey_norm = (xmlChar *) nmem_strdup(se->nmem, (char*) mergekey);
xmlFree(mergekey);
int first, last;
type = xmlGetProp(n, (xmlChar *) "type");
- value = xmlNodeListGetString(xdoc, n->children, 0);
+ value = xmlNodeListGetString(xdoc, n->children, 1);
if (!type || !value)
continue;