aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-04-19 13:57:28 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-04-19 13:57:28 +0000
commitc1930c80780b6630ee553fecff71c5e7ae19f1ce (patch)
tree6ee2510ec3924184d47fd17975aab1ed17a34671 /searchcore
parent2bfa5f9fb38cad470768efa04f63cce10ef141a9 (diff)
Add docidlimit to exception and catch exception and also provide schema name to help identify root cause.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/matchview.cpp7
2 files changed, 11 insertions, 3 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
index 33a0001cc75..cbe697fa426 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
@@ -765,7 +765,12 @@ DocumentDB::match(const SearchRequest &req, vespalib::ThreadBundle &threadBundle
{
// Ignore input searchhandler. Use readysubdb's searchhandler instead.
ISearchHandler::SP view(_subDBs.getReadySubDB()->getSearchView());
- return view->match(req, threadBundle);
+ try {
+ return view->match(req, threadBundle);
+ } catch (const std::exception & e) {
+ LOG(warning, "match failed for document type '%s' with exception: %s", getName().c_str(), e.what());
+ throw e;
+ }
}
std::unique_ptr<DocsumReply>
diff --git a/searchcore/src/vespa/searchcore/proton/server/matchview.cpp b/searchcore/src/vespa/searchcore/proton/server/matchview.cpp
index a265281b4ce..acd8c65791c 100644
--- a/searchcore/src/vespa/searchcore/proton/server/matchview.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/matchview.cpp
@@ -6,6 +6,7 @@
#include <vespa/searchlib/engine/searchrequest.h>
#include <vespa/searchlib/engine/searchreply.h>
#include <vespa/vespalib/util/stringfmt.h>
+#include <vespa/vespalib/util/exceptions.h>
#include <vespa/log/log.h>
LOG_SETUP(".proton.server.matchview");
@@ -22,8 +23,9 @@ using search::queryeval::FieldSpec;
using search::queryeval::FieldSpecList;
using search::queryeval::Searchable;
using searchcorespi::IndexSearchable;
-using vespalib::make_string;
using vespalib::ThreadBundle;
+using vespalib::IllegalArgumentException;
+using namespace vespalib::make_string_short;
namespace proton {
@@ -52,7 +54,8 @@ MatchView::getMatcher(const vespalib::string & rankProfile) const
{
Matcher::SP retval = _matchers->lookup(rankProfile);
if ( ! retval) {
- throw std::runtime_error(make_string("Failed locating Matcher for rank profile '%s'", rankProfile.c_str()));
+ throw IllegalArgumentException(fmt("Failed locating Matcher for rank profile '%s' docIdLimit=%d",
+ rankProfile.c_str(), _docIdLimit.get()), VESPA_STRLOC);
}
LOG(debug, "Rankprofile = %s has termwise_limit=%f", rankProfile.c_str(), retval->get_termwise_limit());
return retval;