<limit bandwidth="50000" pdu="100" search="5" retrieve="50"/>
</filter>
<filter type="session_shared">
- <resultset ttl="10" max="3" optimizesearch="false"/>
+ <resultset ttl="10" max="3" optimizesearch="false" restart="true"/>
<session ttl="30"/>
</filter>
<filter type="log">
int m_resultset_max;
int m_session_ttl;
bool m_optimize_search;
+ bool m_restart;
int m_session_max;
};
}
}
}
- if (!session_restarted &&
+ if (m_p->m_restart && !session_restarted &&
condition == YAZ_BIB1_TEMPORARY_SYSTEM_ERROR)
{
+ package.log("session_shared", YLOG_LOG, "restart");
bc->remove_backend(found_backend);
session_restarted = true;
found_backend.reset();
return; // search error
}
}
- if (!session_restarted && new_set->m_result_set_size < 0)
+ if (m_p->m_restart && !session_restarted && new_set->m_result_set_size < 0)
{
+ package.log("session_shared", YLOG_LOG, "restart");
bc->remove_backend(found_backend);
session_restarted = true;
found_backend.reset();
m_resultset_max = 10;
m_session_ttl = 90;
m_optimize_search = true;
+ m_restart = true;
m_session_max = 100;
}
m_p->m_optimize_search =
mp::xml::get_bool(attr->children, true);
}
+ else if (!strcmp((const char *) attr->name, "restart"))
+ {
+ m_p->m_restart = mp::xml::get_bool(attr->children, true);
+ }
else
throw mp::filter::FilterException(
"Bad attribute " + std::string((const char *)
element mp:resultset {
attribute max { xsd:integer }?,
attribute ttl { xsd:integer }?,
- attribute optimizesearch { xsd:boolean }?
+ attribute optimizesearch { xsd:boolean }?,
+ attribute restart { xsd:boolean }?
}?,
element mp:session {
attribute ttl { xsd:integer }?,