summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@oath.com>2021-10-14 10:04:26 +0000
committerHåvard Pettersen <havardpe@oath.com>2021-10-14 13:16:12 +0000
commita57815a82d4bf248a1179210f033fb94a58e0240 (patch)
tree34c0037397d825a6c803d2cf3573c56f375e4e8e /searchcore
parent73384b28424890ac344ea04c3efdf936b279fbc4 (diff)
report more issues
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/grouping/groupingmanager.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/querynodes.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/requestcontext.cpp8
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchview.cpp4
5 files changed, 15 insertions, 9 deletions
diff --git a/searchcore/src/vespa/searchcore/grouping/groupingmanager.cpp b/searchcore/src/vespa/searchcore/grouping/groupingmanager.cpp
index 42c5d16162e..f5dac65dfc4 100644
--- a/searchcore/src/vespa/searchcore/grouping/groupingmanager.cpp
+++ b/searchcore/src/vespa/searchcore/grouping/groupingmanager.cpp
@@ -60,9 +60,7 @@ GroupingManager::init(const IAttributeContext &attrCtx)
grouping.configureStaticStuff(stuff);
list.push_back(groupingList[i]);
} catch (const std::exception & e) {
- auto msg = fmt("Could not locate attribute for grouping number %ld : %s. Ignoring grouping '%s'", i, e.what(), grouping.asString().c_str());
- Issue::report(msg);
- LOG(error, "%s", msg.c_str());
+ Issue::report("Could not locate attribute for grouping number %ld : %s. Ignoring grouping '%s'", i, e.what(), grouping.asString().c_str());
}
}
std::swap(list, groupingList);
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
index ba812e6c79e..dfaf56e09f3 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
@@ -9,6 +9,7 @@
#include <vespa/searchlib/attribute/diversity.h>
#include <vespa/searchlib/attribute/attribute_operation.h>
#include <vespa/searchlib/attribute/attribute_blueprint_params.h>
+#include <vespa/vespalib/util/issue.h>
#include <vespa/log/log.h>
LOG_SETUP(".proton.matching.match_tools");
@@ -19,6 +20,7 @@ using search::queryeval::IDiversifier;
using search::attribute::diversity::DiversityFilter;
using search::attribute::BasicType;
using search::attribute::AttributeBlueprintParams;
+using vespalib::Issue;
using namespace search::fef;
using namespace search::fef::indexproperties::matchphase;
@@ -234,7 +236,7 @@ MatchToolsFactory::createDiversifier(uint32_t heapSize) const
}
auto attr = _requestContext.getAttribute(_diversityParams.attribute);
if ( !attr) {
- LOG(warning, "Skipping diversity due to no %s attribute.", _diversityParams.attribute.c_str());
+ Issue::report("Skipping diversity due to no %s attribute.", _diversityParams.attribute.c_str());
return std::unique_ptr<IDiversifier>();
}
size_t max_per_group = heapSize/_diversityParams.min_groups;
diff --git a/searchcore/src/vespa/searchcore/proton/matching/querynodes.cpp b/searchcore/src/vespa/searchcore/proton/matching/querynodes.cpp
index 5c5ea116844..661da4273f8 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/querynodes.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/querynodes.cpp
@@ -6,6 +6,7 @@
#include "handlerecorder.h"
#include <vespa/searchlib/query/tree/templatetermvisitor.h>
#include <vespa/searchlib/queryeval/orsearch.h>
+#include <vespa/vespalib/util/issue.h>
#include <vespa/log/log.h>
LOG_SETUP(".proton.matching.querynodes");
@@ -25,6 +26,7 @@ using search::queryeval::SearchIterator;
using std::map;
using std::vector;
using vespalib::string;
+using vespalib::Issue;
namespace proton::matching {
@@ -71,7 +73,7 @@ ProtonTermData::resolveFromChildren(const std::vector<Node *> &subterms)
for (size_t i = 0; i < subterms.size(); ++i) {
const ProtonTermData *child = termDataFromNode(*subterms[i]);
if (child == 0) {
- LOG(warning, "child of equiv is not a term");
+ Issue::report("child of equiv is not a term");
continue;
}
for (size_t j = 0; j < child->numFields(); ++j) {
diff --git a/searchcore/src/vespa/searchcore/proton/matching/requestcontext.cpp b/searchcore/src/vespa/searchcore/proton/matching/requestcontext.cpp
index b1bbd0c4b3d..055ee586856 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/requestcontext.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/requestcontext.cpp
@@ -7,11 +7,13 @@
#include <vespa/searchlib/fef/properties.h>
#include <vespa/vespalib/objects/nbostream.h>
#include <vespa/vespalib/util/exceptions.h>
+#include <vespa/vespalib/util/issue.h>
#include <vespa/log/log.h>
LOG_SETUP(".proton.matching.requestcontext");
using vespalib::eval::FastValueBuilderFactory;
+using vespalib::Issue;
namespace proton {
@@ -54,9 +56,9 @@ RequestContext::get_query_tensor(const vespalib::string& tensor_name) const
vespalib::nbostream stream(value.data(), value.size());
try {
return decode_value(stream, FastValueBuilderFactory::get());
- } catch (vespalib::Exception& ex) {
- LOG(warning, "Query tensor '%s' could not be deserialized: %s",
- tensor_name.c_str(), ex.getMessage().c_str());
+ } catch (vespalib::eval::DecodeValueException& ex) {
+ Issue::report("Query tensor '%s' could not be deserialized: %s",
+ tensor_name.c_str(), ex.getMessage().c_str());
return {};
}
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchview.cpp b/searchcore/src/vespa/searchcore/proton/server/searchview.cpp
index b1e350f0b5e..896900c3a82 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchview.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/searchview.cpp
@@ -4,6 +4,7 @@
#include <vespa/searchcore/proton/docsummary/docsumcontext.h>
#include <vespa/searchlib/engine/searchreply.h>
#include <vespa/vespalib/data/slime/slime.h>
+#include <vespa/vespalib/util/issue.h>
#include <vespa/log/log.h>
LOG_SETUP(".proton.server.searchview");
@@ -18,6 +19,7 @@ using search::engine::DocsumReply;
using search::engine::DocsumRequest;
using search::engine::SearchReply;
using vespalib::ThreadBundle;
+using vespalib::Issue;
namespace proton {
@@ -104,7 +106,7 @@ SearchView::getDocsums(const DocsumRequest & req)
{
LOG(spam, "getDocsums(): resultClass(%s), numHits(%zu)", req.resultClassName.c_str(), req.hits.size());
if (_summarySetup->getResultConfig(). LookupResultClassId(req.resultClassName.c_str()) == ResultConfig::NoClassID()) {
- LOG(warning, "There is no summary class with name '%s' in the summary config. Returning empty document summary for %zu hit(s)",
+ Issue::report("There is no summary class with name '%s' in the summary config. Returning empty document summary for %zu hit(s)",
req.resultClassName.c_str(), req.hits.size());
return createEmptyReply(req);
}