diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-09-30 17:10:30 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2019-09-30 17:10:30 +0000 |
commit | cd700875d174d8d12ea501f5ca71f2723307c65c (patch) | |
tree | 10e3025f18bae83ac184855531232e37f157c864 /searchlib | |
parent | fbbf3a917e3b3c3e13919b1056fda72a5704099c (diff) |
Remove some more transport related stuff.
Diffstat (limited to 'searchlib')
5 files changed, 5 insertions, 53 deletions
diff --git a/searchlib/src/tests/engine/proto_converter/proto_converter_test.cpp b/searchlib/src/tests/engine/proto_converter/proto_converter_test.cpp index e38820b6e8b..7526326b6ca 100644 --- a/searchlib/src/tests/engine/proto_converter/proto_converter_test.cpp +++ b/searchlib/src/tests/engine/proto_converter/proto_converter_test.cpp @@ -2,7 +2,6 @@ #include <vespa/vespalib/gtest/gtest.h> #include <vespa/searchlib/engine/proto_converter.h> -#include <vespa/searchlib/common/transport.h> #include <vespa/vespalib/data/slime/slime.h> #include <vespa/vespalib/data/slime/binary_format.h> @@ -343,14 +342,14 @@ TEST_F(DocsumRequestTest, require_that_cache_query_is_converted) { proto.set_cache_query(true); convert(); EXPECT_TRUE(request.propertiesMap.cacheProperties().lookup("query").found()); - EXPECT_FALSE((request.queryFlags & search::fs4transport::QFLAG_DUMP_FEATURES) != 0); + EXPECT_FALSE(request.dumpFeatures); } TEST_F(DocsumRequestTest, require_that_dump_features_is_converted) { proto.set_dump_features(true); convert(); EXPECT_FALSE(request.propertiesMap.cacheProperties().lookup("query").found()); - EXPECT_TRUE((request.queryFlags & search::fs4transport::QFLAG_DUMP_FEATURES) != 0); + EXPECT_TRUE(request.dumpFeatures); } TEST_F(DocsumRequestTest, require_that_rank_profile_is_converted) { diff --git a/searchlib/src/vespa/searchlib/common/transport.h b/searchlib/src/vespa/searchlib/common/transport.h deleted file mode 100644 index 301acde7bd6..00000000000 --- a/searchlib/src/vespa/searchlib/common/transport.h +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -#pragma once - -#include <cstdint> - -namespace search::fs4transport { - -/** - * Instead of using a 32-bit number to send the 'usehardware' flag, we - * now use this 32-bit number to send 32 flags. The currently defined flags - * are as follows: - * <ul> - * <li><b>QFLAG_EXTENDED_COVERAGE</b>: Indicates that the it is able to receive extended coverage information.</li> - * <li><b>QFLAG_COVERAGE_NODES</b>: Indicate that it is able to handle nodes information.</li> - * <li><b>QFLAG_ESTIMATE</b>: Indicates that the query is performed to get - * an estimate of the total number of hits</li> - * <li><b>QFLAG_DUMP_FEATURES</b>: Dump detailed ranking information. Note that - * this flag will only be considered when sent in a - * GETDOCSUMSX packet. Is is put here to avoid having - * 2 separate query related flag spaces</li> - * <li><b>QFLAG_DROP_SORTDATA</b>: Don't return any sort data even if sortspec - * is used.</li> - * <li><b>QFLAG_NO_RESULTCACHE</b>: Do not use any result cache. Perform query no matter what.</li> - * </ul> - **/ -enum queryflags { - QFLAG_DROP_SORTDATA = 0x00004000, - QFLAG_DUMP_FEATURES = 0x00040000 -}; - -// docsum class for slime tunneling -const uint32_t SLIME_MAGIC_ID = 0x55555555; - -} diff --git a/searchlib/src/vespa/searchlib/engine/proto_converter.cpp b/searchlib/src/vespa/searchlib/engine/proto_converter.cpp index 1736cf1f72a..2495a6e12bd 100644 --- a/searchlib/src/vespa/searchlib/engine/proto_converter.cpp +++ b/searchlib/src/vespa/searchlib/engine/proto_converter.cpp @@ -5,7 +5,6 @@ #include <vespa/vespalib/data/slime/slime.h> #include <vespa/vespalib/data/slime/binary_format.h> #include <vespa/vespalib/data/smart_buffer.h> -#include <vespa/searchlib/common/transport.h> namespace search::engine { @@ -119,9 +118,7 @@ ProtoConverter::docsum_request_from_proto(const ProtoDocsumRequest &proto, Docsu if (proto.cache_query()) { request.propertiesMap.lookupCreate(MapNames::CACHES).add("query", "true"); } - if (proto.dump_features()) { - request.queryFlags |= fs4transport::QFLAG_DUMP_FEATURES; - } + request.dumpFeatures = proto.dump_features(); request.ranking = proto.rank_profile(); if ((proto.feature_overrides_size() + proto.tensor_feature_overrides_size()) > 0) { auto &feature_overrides = request.propertiesMap.lookupCreate(MapNames::FEATURE); diff --git a/searchlib/src/vespa/searchlib/engine/request.cpp b/searchlib/src/vespa/searchlib/engine/request.cpp index 956653d5269..84615105579 100644 --- a/searchlib/src/vespa/searchlib/engine/request.cpp +++ b/searchlib/src/vespa/searchlib/engine/request.cpp @@ -1,14 +1,13 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "request.h" -#include <vespa/searchlib/common/transport.h> namespace search::engine { Request::Request(RelativeTime relativeTime) : _relativeTime(std::move(relativeTime)), _timeOfDoom(fastos::TimeStamp(fastos::TimeStamp::FUTURE)), - queryFlags(0), + dumpFeatures(false), ranking(), location(), propertiesMap(), @@ -35,10 +34,4 @@ fastos::TimeStamp Request::getTimeLeft() const return _timeOfDoom - _relativeTime.now(); } -bool -Request::should_drop_sort_data() const -{ - return ((queryFlags & fs4transport::QFLAG_DROP_SORTDATA) != 0); -} - } diff --git a/searchlib/src/vespa/searchlib/engine/request.h b/searchlib/src/vespa/searchlib/engine/request.h index f5f24b6743f..a021ec6bfaa 100644 --- a/searchlib/src/vespa/searchlib/engine/request.h +++ b/searchlib/src/vespa/searchlib/engine/request.h @@ -28,8 +28,6 @@ public: return vespalib::stringref(&stackDump[0], stackDump.size()); } - bool should_drop_sort_data() const; - void setTraceLevel(uint32_t level, uint32_t minLevel) const { _trace.setLevel(level); _trace.start(minLevel); @@ -43,7 +41,7 @@ private: fastos::TimeStamp _timeOfDoom; public: /// Everything here should move up to private section and have accessors - uint32_t queryFlags; + bool dumpFeatures; vespalib::string ranking; vespalib::string location; PropertiesMap propertiesMap; |