int *error,
char **addinfo,
mp::odr &odr,
+ std::string torus_url,
std::string &torus_db,
std::string &realm);
void handle_present(mp::Package &package);
}
else if (!strcmp(name, "realm"))
realm = value;
+ else if (!strcmp(name, "torus_url"))
+ torus_url = value;
else if (name[0] == 'x' && name[1] == '-')
{
out_names[no_out_args] = name;
}
if (torus_db.compare("IR-Explain---1") == 0)
- return explain_search(package, database, error, addinfo, odr, torus_db,
- realm);
+ return explain_search(package, database, error, addinfo, odr, torus_url,
+ torus_db, realm);
SearchablePtr sptr;
int *error,
char **addinfo,
mp::odr &odr,
+ std::string torus_url,
std::string &torus_db,
std::string &realm)
{
else if (query->which == Z_Query_type_104 &&
query->u.type_104->which == Z_External_CQL)
{
- std::string torus_url = m_p->torus_searchable_url;
std::string torus_query(query->u.type_104->u.cql);
xmlDoc *doc = mp::get_searchable(package, torus_url, "",
torus_query,
found = url_template.find("%query");
if (found != std::string::npos)
url_template.replace(found, 6, mp::util::uri_encode(query));
- else
- {
- if (db.length() == 0)
- {
- package.log("zoom", YLOG_WARN,
- "%query not defined in <torus url=\"..\"");
- return 0;
- }
- }
found = url_template.find("%db");
if (found != std::string::npos)