summaryrefslogtreecommitdiffstats
path: root/streamingvisitors
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-03-19 15:44:03 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2024-03-19 15:49:04 +0000
commitcd5e8a4a4c1e14ae41910b285478c1500c42edc3 (patch)
treeef9e2b3156076a40d608e7f5f604a7dbc7dc0065 /streamingvisitors
parent87ed73a55762d2b13dba072d6549870a05268df3 (diff)
Less noisy error handling for common user errors.
Diffstat (limited to 'streamingvisitors')
-rw-r--r--streamingvisitors/src/vespa/searchvisitor/searchvisitor.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/streamingvisitors/src/vespa/searchvisitor/searchvisitor.cpp b/streamingvisitors/src/vespa/searchvisitor/searchvisitor.cpp
index 3fdc117dc88..95d7f01b15d 100644
--- a/streamingvisitors/src/vespa/searchvisitor/searchvisitor.cpp
+++ b/streamingvisitors/src/vespa/searchvisitor/searchvisitor.cpp
@@ -11,6 +11,7 @@
#include <vespa/document/datatype/tensor_data_type.h>
#include <vespa/document/datatype/weightedsetdatatype.h>
#include <vespa/document/datatype/mapdatatype.h>
+#include <vespa/document/base/exceptions.h>
#include <vespa/searchlib/aggregation/modifiers.h>
#include <vespa/searchlib/attribute/single_raw_ext_attribute.h>
#include <vespa/searchlib/common/packets.h>
@@ -1027,7 +1028,7 @@ SearchVisitor::setupGrouping(const std::vector<char> & groupingBlob)
vespalib::NBOSerializer is(iss);
uint32_t numGroupings(0);
is >> numGroupings;
- for(size_t i(0); i < numGroupings; i++) {
+ for (size_t i(0); i < numGroupings; i++) {
auto ag = std::make_unique<Grouping>();
ag->deserialize(is);
GroupingList::value_type groupingPtr(ag.release());
@@ -1049,8 +1050,10 @@ SearchVisitor::setupGrouping(const std::vector<char> & groupingBlob)
} else {
LOG(warning, "You can not collect hits with an all aggregator yet.");
}
+ } catch (const document::FieldNotFoundException & e) {
+ LOG(warning, "Could not locate field for grouping number %ld : %s", i, e.getMessage().c_str());
} catch (const std::exception & e) {
- LOG(error, "Could not locate attribute for grouping number %ld : %s", i, e.what());
+ LOG(error, "Unknown issue for grouping number %ld : %s", i, e.what());
}
}
}