summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2019-03-11 11:44:10 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2019-03-11 11:44:10 +0000
commit6fe99f37a23731913ac470daee4ecc75bd60670b (patch)
tree3a61e8b28ca65569ba927ca860c236dc264b7c70 /searchcore
parent48ce50681ad29a1a17446dbb1f0413615ca35725 (diff)
Enable that we can see the difference between query error and timeout
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/matcher.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
index 4ebf74c373f..a65e7eae784 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
@@ -100,10 +100,11 @@ Matcher::getFeatureSet(const DocsumRequest & req, ISearchContext & searchCtx, IA
SessionManager & sessionMgr, bool summaryFeatures)
{
SessionId sessionId(&req.sessionId[0], req.sessionId.size());
+ bool expectedSessionCached(false);
if (!sessionId.empty()) {
const Properties &cache_props = req.propertiesMap.cacheProperties();
- bool searchSessionCached = cache_props.lookup("query").found();
- if (searchSessionCached) {
+ expectedSessionCached = cache_props.lookup("query").found();
+ if (expectedSessionCached) {
SearchSession::SP session(sessionMgr.pickSearch(sessionId));
if (session) {
MatchToolsFactory &mtf = session->getMatchToolsFactory();
@@ -118,8 +119,9 @@ Matcher::getFeatureSet(const DocsumRequest & req, ISearchContext & searchCtx, IA
MatchToolsFactory::UP mtf = create_match_tools_factory(req, searchCtx, attrCtx, metaStore,
req.propertiesMap.featureOverrides());
if (!mtf->valid()) {
- LOG(warning, "getFeatureSet(%s): query execution failed (invalid query). Returning empty feature set",
- (summaryFeatures ? "summary features" : "rank features"));
+ LOG(warning, "getFeatureSet(%s): query execution failed (%s). Returning empty feature set",
+ (summaryFeatures ? "summary features" : "rank features"),
+ (expectedSessionCached) ? "session has expired" : "invalid query");
return std::make_shared<FeatureSet>();
}
return findFeatureSet(req, *mtf, summaryFeatures);