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 /searchsummary | |
parent | fbbf3a917e3b3c3e13919b1056fda72a5704099c (diff) |
Remove some more transport related stuff.
Diffstat (limited to 'searchsummary')
5 files changed, 9 insertions, 10 deletions
diff --git a/searchsummary/src/tests/docsummary/slime_summary/slime_summary_test.cpp b/searchsummary/src/tests/docsummary/slime_summary/slime_summary_test.cpp index efeb066135f..c0d9ec2de3a 100644 --- a/searchsummary/src/tests/docsummary/slime_summary/slime_summary_test.cpp +++ b/searchsummary/src/tests/docsummary/slime_summary/slime_summary_test.cpp @@ -4,7 +4,6 @@ #include <vespa/searchsummary/docsummary/docsumwriter.h> #include <vespa/searchsummary/docsummary/resultpacker.h> #include <vespa/searchsummary/docsummary/docsumstate.h> -#include <vespa/searchlib/common/transport.h> #include <vespa/vespalib/data/slime/slime.h> #include <vespa/searchlib/util/slime_output_raw_buf_adapter.h> @@ -43,7 +42,7 @@ struct DocsumFixture : IDocsumStore, GetDocsumsStateCallback { ASSERT_GREATER(buf.GetUsedLen(), sizeof(classId)); memcpy(&classId, buf.GetDrainPos(), sizeof(classId)); buf.Drain(sizeof(classId)); - EXPECT_EQUAL(classId, ::search::fs4transport::SLIME_MAGIC_ID); + EXPECT_EQUAL(classId, SLIME_MAGIC_ID); EXPECT_GREATER(vespalib::slime::BinaryFormat ::decode(Memory(buf.GetDrainPos(), buf.GetUsedLen()), slime), 0u); } diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.cpp b/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.cpp index 4e3540fb573..0e647b43e78 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.cpp @@ -4,7 +4,6 @@ #include "docsumstate.h" #include "docsum_field_writer_state.h" #include <vespa/searchcommon/common/undefinedvalues.h> -#include <vespa/searchlib/common/transport.h> #include <vespa/searchlib/util/slime_output_raw_buf_adapter.h> #include <vespa/searchlib/attribute/iattributemanager.h> #include <vespa/vespalib/data/slime/slime.h> @@ -20,7 +19,7 @@ uint32_t IDocsumWriter::slime2RawBuf(const Slime & slime, RawBuf & buf) { const uint32_t preUsed = buf.GetUsedLen(); - const uint32_t magic = ::search::fs4transport::SLIME_MAGIC_ID; + const uint32_t magic = SLIME_MAGIC_ID; buf.append(&magic, sizeof(magic)); SlimeOutputRawBufAdapter adapter(buf); vespalib::slime::BinaryFormat::encode(slime, adapter); diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.h b/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.h index 92b26d5cf14..e5dd2793089 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.h @@ -16,6 +16,8 @@ using search::IAttributeManager; namespace search::docsummary { +static constexpr uint32_t SLIME_MAGIC_ID = 0x55555555; + class IDocsumWriter { public: diff --git a/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.cpp b/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.cpp index 0029a57581c..8f8166a2806 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.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 "getdocsumargs.h" -#include "resultconfig.h" namespace search::docsummary { GetDocsumArgs::GetDocsumArgs() : _ranking(), - _qflags(0), _resultClassName(), + _dumpFeatures(false), _stackItems(0), _stackDump(), _location(), @@ -35,7 +34,7 @@ void GetDocsumArgs::initFromDocsumRequest(const search::engine::DocsumRequest &req) { _ranking = req.ranking; - _qflags = req.queryFlags; + _dumpFeatures = req.dumpFeatures; _resultClassName = req.resultClassName; _stackItems = req.stackItems; _stackDump = req.stackDump; diff --git a/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.h b/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.h index f0574e0d21c..ce5dc695f08 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.h @@ -15,8 +15,8 @@ public: private: vespalib::string _ranking; - uint32_t _qflags; vespalib::string _resultClassName; + bool _dumpFeatures; uint32_t _stackItems; std::vector<char> _stackDump; vespalib::string _location; @@ -29,7 +29,6 @@ public: void initFromDocsumRequest(const search::engine::DocsumRequest &req); void SetRankProfile(const vespalib::string &ranking) { _ranking = ranking; } - void SetQueryFlags(uint32_t qflags) { _qflags = qflags; } void setResultClassName(vespalib::stringref name) { _resultClassName = name; } void SetStackDump(uint32_t stackItems, uint32_t stackDumpLen, const char *stackDump); void setLocation(vespalib::stringref location) { @@ -45,7 +44,8 @@ public: return vespalib::stringref(&_stackDump[0], _stackDump.size()); } - uint32_t GetQueryFlags() const { return _qflags; } + void dumpFeatures(bool v) { _dumpFeatures = v; } + bool dumpFeatures() const { return _dumpFeatures; } const PropsMap &propertiesMap() const { return _propertiesMap; } |