/* This file is part of Pazpar2.
- Copyright (C) 2006-2010 Index Data
+ Copyright (C) 2006-2011 Index Data
Pazpar2 is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
"pz:id",
"pz:name",
"pz:queryencoding",
- "pz:ip",
"pz:zproxy",
"pz:apdulog",
"pz:sru",
"pz:pqf_strftime",
"pz:negotiation_charset",
"pz:max_connections",
+ "pz:reuse_connections",
+ "pz:termlist_term_factor",
+ "pz:preferred",
+ "pz:extra_args",
+ "pz:query_syntax",
+ "pz:facetmap:",
+ "pz:limitmap:",
+ "pz:url",
+ "pz:sortmap:",
0
};
// This is called from grep_databases -- adds/overrides setting for a target
// This is also where the rules for precedence of settings are implemented
-static void update_database(void *context, struct database *db)
+static void update_database_fun(void *context, struct database *db)
{
struct setting *set = ((struct update_database_context *)
context)->set;
int offset;
// Is this the right database?
- if (!match_zurl(db->url, set->target))
+ if (!match_zurl(db->id, set->target))
return;
offset = settings_create_offset(service, set->name);
struct update_database_context context;
context.set = set;
context.service = service;
- predef_grep_databases(&context, service, update_database);
+ predef_grep_databases(&context, service, update_database_fun);
}
// This simply copies the 'hard' (application-specific) settings
// If target address is not wildcard, add the database
if (*set->target && !zurl_wildcard(set->target))
- find_database(set->target, service);
+ create_database_for_service(set->target, service);
// Determine if we already have a dictionary entry
if (!strncmp(set->name, "pz:", 3) && (p = strchr(set->name + 3, ':')))