aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-11-30 18:06:54 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2016-12-12 02:55:41 +0100
commit602bb910df6998d0f7c56a67d2707c9c6c2e7d58 (patch)
treebb0d0f57b4de9e3ef8ea03d29929747f586e8d40 /searchlib
parentc650f2f379179780d428fb5505a0ed3d52f48ba4 (diff)
Targeted include
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/tests/transactionlogstress/translogstress.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/CMakeLists.txt1
-rw-r--r--searchlib/src/vespa/searchlib/attribute/floatbase.cpp17
-rw-r--r--searchlib/src/vespa/searchlib/attribute/floatbase.h77
-rw-r--r--searchlib/src/vespa/searchlib/attribute/floatbase.hpp84
-rw-r--r--searchlib/src/vespa/searchlib/attribute/integerbase.cpp7
-rw-r--r--searchlib/src/vespa/searchlib/attribute/integerbase.hpp5
-rw-r--r--searchlib/src/vespa/searchlib/attribute/not_implemented_attribute.cpp153
-rw-r--r--searchlib/src/vespa/searchlib/attribute/not_implemented_attribute.h193
-rw-r--r--searchlib/src/vespa/searchlib/tensor/generic_tensor_store.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/transactionlog/translogclient.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/util/rawbuf.h3
12 files changed, 315 insertions, 237 deletions
diff --git a/searchlib/src/tests/transactionlogstress/translogstress.cpp b/searchlib/src/tests/transactionlogstress/translogstress.cpp
index 1c51c81e633..1199ff48843 100644
--- a/searchlib/src/tests/transactionlogstress/translogstress.cpp
+++ b/searchlib/src/tests/transactionlogstress/translogstress.cpp
@@ -1,7 +1,6 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
#include <vespa/vespalib/util/buffer.h>
+#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/searchlib/transactionlog/translogserver.h>
#include <vespa/searchlib/transactionlog/translogclient.h>
#include <vespa/searchlib/util/rand48.h>
@@ -10,6 +9,7 @@
#include <iostream>
#include <stdexcept>
+#include <vespa/log/log.h>
LOG_SETUP("translogstress");
using document::ByteBuffer;
diff --git a/searchlib/src/vespa/searchlib/attribute/CMakeLists.txt b/searchlib/src/vespa/searchlib/attribute/CMakeLists.txt
index 2bda7e9fdd6..a44fbf7025c 100644
--- a/searchlib/src/vespa/searchlib/attribute/CMakeLists.txt
+++ b/searchlib/src/vespa/searchlib/attribute/CMakeLists.txt
@@ -63,6 +63,7 @@ vespa_add_library(searchlib_attribute OBJECT
multistringpostattribute.cpp
multivalueattribute.cpp
multivalueattributesaver.cpp
+ not_implemented_attribute.cpp
numericbase.cpp
postingchange.cpp
postinglistattribute.cpp
diff --git a/searchlib/src/vespa/searchlib/attribute/floatbase.cpp b/searchlib/src/vespa/searchlib/attribute/floatbase.cpp
index daf07a1879c..dd1206b500e 100644
--- a/searchlib/src/vespa/searchlib/attribute/floatbase.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/floatbase.cpp
@@ -1,14 +1,10 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include "floatbase.h"
+#include "floatbase.hpp"
+#include "attributevector.hpp"
#include <vespa/searchlib/common/sort.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/document/fieldvalue/fieldvalue.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".searchlib.attribute.floatbase");
-
namespace search {
IMPLEMENT_IDENTIFIABLE_ABSTRACT(FloatingPointAttribute, NumericAttribute);
@@ -87,4 +83,13 @@ bool FloatingPointAttribute::apply(DocId doc, const ArithmeticValueUpdate & op)
return retval;
}
+const char *
+FloatingPointAttribute::getString(DocId doc, char * s, size_t sz) const {
+ double v = getFloat(doc);
+ snprintf(s, sz, "%g", v);
+ return s;
+}
+
+template class FloatingPointAttributeTemplate<float>;
+template class FloatingPointAttributeTemplate<double>;
}
diff --git a/searchlib/src/vespa/searchlib/attribute/floatbase.h b/searchlib/src/vespa/searchlib/attribute/floatbase.h
index e802fd9675a..e34701a47cb 100644
--- a/searchlib/src/vespa/searchlib/attribute/floatbase.h
+++ b/searchlib/src/vespa/searchlib/attribute/floatbase.h
@@ -1,10 +1,10 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/searchlib/attribute/numericbase.h>
-#include <vespa/searchlib/attribute/multivalue.h>
-#include <vespa/searchlib/attribute/loadednumericvalue.h>
-#include <vespa/searchlib/attribute/changevector.h>
+#include "numericbase.h"
+#include "multivalue.h"
+#include "loadednumericvalue.h"
+#include "changevector.h"
namespace search {
@@ -30,20 +30,20 @@ public:
return AttributeVector::update(_changes, doc, NumericChangeData<double>(v));
}
bool apply(DocId doc, const ArithmeticValueUpdate & op);
- virtual bool applyWeight(DocId doc, const FieldValue & fv, const ArithmeticValueUpdate & wAdjust);
- virtual uint32_t clearDoc(DocId doc);
+ bool applyWeight(DocId doc, const FieldValue & fv, const ArithmeticValueUpdate & wAdjust) override;
+ uint32_t clearDoc(DocId doc) override;
protected:
- virtual const char * getString(DocId doc, char * s, size_t sz) const { double v = getFloat(doc); snprintf(s, sz, "%g", v); return s; }
+ const char * getString(DocId doc, char * s, size_t sz) const override;
FloatingPointAttribute(const vespalib::string & name, const Config & c);
typedef ChangeTemplate<NumericChangeData<double> > Change;
typedef ChangeVectorT< Change > ChangeVector;
ChangeVector _changes;
private:
- virtual uint32_t get(DocId doc, vespalib::string * v, uint32_t sz) const;
- virtual uint32_t get(DocId doc, const char ** v, uint32_t sz) const;
- virtual uint32_t get(DocId doc, WeightedString * v, uint32_t sz) const;
- virtual uint32_t get(DocId doc, WeightedConstChar * v, uint32_t sz) const;
+ uint32_t get(DocId doc, vespalib::string * v, uint32_t sz) const override;
+ uint32_t get(DocId doc, const char ** v, uint32_t sz) const override;
+ uint32_t get(DocId doc, WeightedString * v, uint32_t sz) const override;
+ uint32_t get(DocId doc, WeightedConstChar * v, uint32_t sz) const override;
virtual double getFloatFromEnum(EnumHandle e) const = 0;
};
@@ -63,60 +63,25 @@ public:
typedef T BaseType;
typedef T LoadedValueType;
typedef SequentialReadModifyWriteInterface<LoadedNumericValueT> LoadedVector;
- virtual uint32_t getRawValues(DocId doc, const multivalue::Value<T> * & values) const {
- (void) doc;
- (void) values;
- throw std::runtime_error(getNativeClassName() + "::getRawValues() not implemented.");
- }
+ virtual uint32_t getRawValues(DocId doc, const multivalue::Value<T> * & values) const;
protected:
- FloatingPointAttributeTemplate(const vespalib::string & name) :
- FloatingPointAttribute(name, BasicType::fromType(T())),
- _defaultValue(ChangeBase::UPDATE, 0, attribute::getUndefined<T>())
- { }
- FloatingPointAttributeTemplate(const vespalib::string & name, const Config & c) :
- FloatingPointAttribute(name, c),
- _defaultValue(ChangeBase::UPDATE, 0, attribute::getUndefined<T>())
- { assert(c.basicType() == BasicType::fromType(T())); }
+ FloatingPointAttributeTemplate(const vespalib::string & name);
+ FloatingPointAttributeTemplate(const vespalib::string & name, const Config & c);
+ ~FloatingPointAttributeTemplate();
static T defaultValue() { return attribute::getUndefined<T>(); }
virtual bool findEnum(T v, EnumHandle & e) const = 0;
- virtual largeint_t getDefaultValue() const { return static_cast<largeint_t>(-std::numeric_limits<T>::max()); }
+ largeint_t getDefaultValue() const override { return static_cast<largeint_t>(-std::numeric_limits<T>::max()); }
Change _defaultValue;
private:
- virtual bool findEnum(const char *value, EnumHandle &e) const {
- vespalib::asciistream iss(value);
- T fvalue = 0;
- try {
- iss >> fvalue;
- } catch (const vespalib::IllegalArgumentException &) {
- }
- return findEnum(fvalue, e);
- }
- virtual bool isUndefined(DocId doc) const { return attribute::isUndefined(get(doc)); }
+ bool findEnum(const char *value, EnumHandle &e) const override;
+ bool isUndefined(DocId doc) const override;
virtual T get(DocId doc) const = 0;
virtual T getFromEnum(EnumHandle e) const = 0;
- virtual double getFloatFromEnum(EnumHandle e) const { return getFromEnum(e); }
- virtual long onSerializeForAscendingSort(DocId doc, void * serTo, long available, const common::BlobConverter * bc) const {
- (void) bc;
- if (available >= long(sizeof(T))) {
- T origValue(get(doc));
- vespalib::serializeForSort< vespalib::convertForSort<T, true> >(origValue, serTo);
- } else {
- return -1;
- }
- return sizeof(T);
- }
- virtual long onSerializeForDescendingSort(DocId doc, void * serTo, long available, const common::BlobConverter * bc) const {
- (void) bc;
- if (available >= long(sizeof(T))) {
- T origValue(get(doc));
- vespalib::serializeForSort< vespalib::convertForSort<T, false> >(origValue, serTo);
- } else {
- return -1;
- }
- return sizeof(T);
- }
+ double getFloatFromEnum(EnumHandle e) const override;
+ long onSerializeForAscendingSort(DocId doc, void * serTo, long available, const common::BlobConverter * bc) const override;
+ long onSerializeForDescendingSort(DocId doc, void * serTo, long available, const common::BlobConverter * bc) const override;
};
}
diff --git a/searchlib/src/vespa/searchlib/attribute/floatbase.hpp b/searchlib/src/vespa/searchlib/attribute/floatbase.hpp
new file mode 100644
index 00000000000..316967a425c
--- /dev/null
+++ b/searchlib/src/vespa/searchlib/attribute/floatbase.hpp
@@ -0,0 +1,84 @@
+// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#pragma once
+
+#include "floatbase.h"
+#include <vespa/vespalib/util/exceptions.h>
+
+namespace search {
+
+template<typename T>
+uint32_t
+FloatingPointAttributeTemplate<T>::getRawValues(DocId doc, const multivalue::Value<T> * & values) const {
+ (void) doc;
+ (void) values;
+ throw std::runtime_error(getNativeClassName() + "::getRawValues() not implemented.");
+}
+
+template<typename T>
+FloatingPointAttributeTemplate<T>::FloatingPointAttributeTemplate(const vespalib::string & name) :
+ FloatingPointAttribute(name, BasicType::fromType(T())),
+ _defaultValue(ChangeBase::UPDATE, 0, attribute::getUndefined<T>())
+{ }
+
+template<typename T>
+FloatingPointAttributeTemplate<T>::FloatingPointAttributeTemplate(const vespalib::string & name, const Config & c) :
+ FloatingPointAttribute(name, c),
+ _defaultValue(ChangeBase::UPDATE, 0, attribute::getUndefined<T>())
+{
+ assert(c.basicType() == BasicType::fromType(T()));
+}
+
+template<typename T>
+FloatingPointAttributeTemplate<T>::~FloatingPointAttributeTemplate() { }
+
+template<typename T>
+bool
+FloatingPointAttributeTemplate<T>::findEnum(const char *value, EnumHandle &e) const {
+ vespalib::asciistream iss(value);
+ T fvalue = 0;
+ try {
+ iss >> fvalue;
+ } catch (const vespalib::IllegalArgumentException &) {
+ }
+ return findEnum(fvalue, e);
+}
+
+template<typename T>
+bool
+FloatingPointAttributeTemplate<T>::isUndefined(DocId doc) const {
+ return attribute::isUndefined(get(doc));
+}
+
+template<typename T>
+double
+FloatingPointAttributeTemplate<T>::getFloatFromEnum(EnumHandle e) const {
+ return getFromEnum(e);
+}
+
+template<typename T>
+long
+FloatingPointAttributeTemplate<T>::onSerializeForAscendingSort(DocId doc, void * serTo, long available, const common::BlobConverter * bc) const {
+ (void) bc;
+ if (available >= long(sizeof(T))) {
+ T origValue(get(doc));
+ vespalib::serializeForSort< vespalib::convertForSort<T, true> >(origValue, serTo);
+ } else {
+ return -1;
+ }
+ return sizeof(T);
+}
+
+template<typename T>
+long
+FloatingPointAttributeTemplate<T>::onSerializeForDescendingSort(DocId doc, void * serTo, long available, const common::BlobConverter * bc) const {
+ (void) bc;
+ if (available >= long(sizeof(T))) {
+ T origValue(get(doc));
+ vespalib::serializeForSort< vespalib::convertForSort<T, false> >(origValue, serTo);
+ } else {
+ return -1;
+ }
+ return sizeof(T);
+}
+
+}
diff --git a/searchlib/src/vespa/searchlib/attribute/integerbase.cpp b/searchlib/src/vespa/searchlib/attribute/integerbase.cpp
index 81cd7a5bb53..8057b152e99 100644
--- a/searchlib/src/vespa/searchlib/attribute/integerbase.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/integerbase.cpp
@@ -1,8 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "integerbase.hpp"
+#include "attributevector.hpp"
#include <vespa/searchlib/common/sort.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/document/fieldvalue/fieldvalue.h>
namespace search {
@@ -83,4 +83,9 @@ bool IntegerAttribute::apply(DocId doc, const ArithmeticValueUpdate & op)
return retval;
}
+template class IntegerAttributeTemplate<int8_t>;
+template class IntegerAttributeTemplate<int16_t>;
+template class IntegerAttributeTemplate<int32_t>;
+template class IntegerAttributeTemplate<int64_t>;
+
}
diff --git a/searchlib/src/vespa/searchlib/attribute/integerbase.hpp b/searchlib/src/vespa/searchlib/attribute/integerbase.hpp
index a218cd11264..dc6df880f49 100644
--- a/searchlib/src/vespa/searchlib/attribute/integerbase.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/integerbase.hpp
@@ -1,10 +1,13 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include "integerbase.hpp"
+#include "integerbase.h"
+#include <vespa/vespalib/util/exceptions.h>
namespace search {
+using largeint_t = attribute::IAttributeVector::largeint_t;
+
template<typename T>
uint32_t
IntegerAttributeTemplate<T>::getRawValues(DocId, const multivalue::Value<T> * &) const {
diff --git a/searchlib/src/vespa/searchlib/attribute/not_implemented_attribute.cpp b/searchlib/src/vespa/searchlib/attribute/not_implemented_attribute.cpp
new file mode 100644
index 00000000000..dba2082ab5b
--- /dev/null
+++ b/searchlib/src/vespa/searchlib/attribute/not_implemented_attribute.cpp
@@ -0,0 +1,153 @@
+// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#include "not_implemented_attribute.h"
+#include <vespa/vespalib/util/exceptions.h>
+
+namespace search {
+
+using largeint_t = attribute::IAttributeVector::largeint_t;
+using SearchContext = AttributeVector::SearchContext;
+
+void
+NotImplementedAttribute::notImplemented() const {
+ throw vespalib::IllegalStateException("The function is not implemented.");
+}
+
+uint32_t
+NotImplementedAttribute::getValueCount(DocId) const {
+ notImplemented();
+ return 0;
+}
+
+largeint_t
+NotImplementedAttribute::getInt(DocId) const {
+ notImplemented();
+ return 0;
+}
+
+double
+NotImplementedAttribute::getFloat(DocId) const {
+ notImplemented();
+ return 0;
+}
+
+const char *
+NotImplementedAttribute::getString(DocId, char *, size_t) const {
+ notImplemented();
+ return NULL;
+}
+
+uint32_t
+NotImplementedAttribute::get(DocId, largeint_t *, uint32_t) const {
+ notImplemented();
+ return 0;
+}
+
+uint32_t
+NotImplementedAttribute::get(DocId, double *, uint32_t) const {
+ notImplemented();
+ return 0;
+}
+
+uint32_t
+NotImplementedAttribute::get(DocId, vespalib::string *, uint32_t) const {
+ notImplemented();
+ return 0;
+}
+
+uint32_t
+NotImplementedAttribute::get(DocId, const char **, uint32_t) const {
+ notImplemented();
+ return 0;
+}
+
+uint32_t
+NotImplementedAttribute::get(DocId, EnumHandle *, uint32_t) const {
+ notImplemented();
+ return 0;
+}
+
+uint32_t
+NotImplementedAttribute::get(DocId, WeightedInt *, uint32_t) const {
+ notImplemented();
+ return 0;
+}
+
+uint32_t
+NotImplementedAttribute::get(DocId, WeightedFloat *, uint32_t) const {
+ notImplemented();
+ return 0;
+}
+
+uint32_t
+NotImplementedAttribute::get(DocId, WeightedString *, uint32_t) const {
+ notImplemented();
+ return 0;
+}
+
+uint32_t
+NotImplementedAttribute::get(DocId, WeightedConstChar *, uint32_t) const {
+ notImplemented();
+ return 0;
+}
+
+uint32_t
+NotImplementedAttribute::get(DocId, WeightedEnum *, uint32_t) const {
+ notImplemented();
+ return 0;
+}
+
+bool
+NotImplementedAttribute::findEnum(const char *, EnumHandle &) const {
+ notImplemented();
+ return false;
+}
+
+long
+NotImplementedAttribute::onSerializeForAscendingSort(DocId, void *, long, const common::BlobConverter *) const {
+ notImplemented();
+ return 0;
+}
+
+long
+NotImplementedAttribute::onSerializeForDescendingSort(DocId, void *, long, const common::BlobConverter *) const {
+ notImplemented();
+ return 0;
+}
+
+uint32_t
+NotImplementedAttribute::clearDoc(DocId) {
+ notImplemented();
+ return 0;
+}
+
+int64_t
+NotImplementedAttribute::getDefaultValue() const {
+ notImplemented();
+ return 0;
+}
+
+uint32_t
+NotImplementedAttribute::getEnum(DocId) const {
+ notImplemented();
+ return 0;
+}
+
+void
+NotImplementedAttribute::getEnumValue(const EnumHandle *, uint32_t *, uint32_t) const {
+ notImplemented();
+}
+
+bool
+NotImplementedAttribute::addDoc(DocId &) {
+ notImplemented();
+ return false;
+}
+
+SearchContext::UP
+NotImplementedAttribute::getSearch(QueryTermSimple::UP, const SearchContext::Params &) const {
+ notImplemented();
+ return SearchContext::UP();
+}
+
+}
diff --git a/searchlib/src/vespa/searchlib/attribute/not_implemented_attribute.h b/searchlib/src/vespa/searchlib/attribute/not_implemented_attribute.h
index 73f0491d808..a7d1e8fde30 100644
--- a/searchlib/src/vespa/searchlib/attribute/not_implemented_attribute.h
+++ b/searchlib/src/vespa/searchlib/attribute/not_implemented_attribute.h
@@ -9,173 +9,32 @@ namespace search {
struct NotImplementedAttribute : AttributeVector {
using AttributeVector::AttributeVector;
- virtual void notImplemented() const __attribute__((noinline)) {
- assert(false);
- throw vespalib::IllegalStateException(
- "The function is not implemented.");
- }
-
- virtual uint32_t
- getValueCount(DocId) const
- {
- notImplemented();
- return 0;
- }
-
- virtual largeint_t
- getInt(DocId) const
- {
- notImplemented();
- return 0;
- }
-
- virtual double
- getFloat(DocId) const
- {
- notImplemented();
- return 0;
- }
-
- virtual const char *
- getString(DocId, char *, size_t) const
- {
- notImplemented();
- return NULL;
- }
-
- virtual uint32_t
- get(DocId, largeint_t *, uint32_t) const
- {
- notImplemented();
- return 0;
- }
-
- virtual uint32_t
- get(DocId, double *, uint32_t) const
- {
- notImplemented();
- return 0;
- }
-
- virtual uint32_t
- get(DocId, vespalib::string *, uint32_t) const
- {
- notImplemented();
- return 0;
- }
-
- virtual uint32_t
- get(DocId, const char **, uint32_t) const
- {
- notImplemented();
- return 0;
- }
-
- virtual uint32_t
- get(DocId, EnumHandle *, uint32_t) const
- {
- notImplemented();
- return 0;
- }
-
- virtual uint32_t
- get(DocId, WeightedInt *, uint32_t) const
- {
- notImplemented();
- return 0;
- }
-
- virtual uint32_t
- get(DocId, WeightedFloat *, uint32_t) const
- {
- notImplemented();
- return 0;
- }
-
- virtual uint32_t
- get(DocId, WeightedString *, uint32_t) const
- {
- notImplemented();
- return 0;
- }
-
- virtual uint32_t
- get(DocId, WeightedConstChar *, uint32_t) const
- {
- notImplemented();
- return 0;
- }
-
- virtual uint32_t
- get(DocId, WeightedEnum *, uint32_t) const
- {
- notImplemented();
- return 0;
- }
-
- virtual bool
- findEnum(const char *, EnumHandle &) const
- {
- notImplemented();
- return false;
- }
-
- virtual long
- onSerializeForAscendingSort(DocId, void *, long,
- const common::BlobConverter *) const
- {
- notImplemented();
- return 0;
- }
-
- virtual long
- onSerializeForDescendingSort(DocId, void *, long,
- const common::BlobConverter *) const
- {
- notImplemented();
- return 0;
- }
-
- virtual uint32_t
- clearDoc(DocId)
- {
- notImplemented();
- return 0;
- }
-
- virtual int64_t
- getDefaultValue() const
- {
- notImplemented();
- return 0;
- }
-
- virtual uint32_t
- getEnum(DocId) const
- {
- notImplemented();
- return 0;
- }
-
- virtual void
- getEnumValue(const EnumHandle *, uint32_t *, uint32_t) const
- {
- notImplemented();
- }
-
- virtual bool
- addDoc(DocId &)
- {
- notImplemented();
- return false;
- }
-
- SearchContext::UP
- getSearch(QueryTermSimple::UP, const SearchContext::Params &) const override
- {
- notImplemented();
- return SearchContext::UP();
- }
+ virtual void notImplemented() const ;
+
+ uint32_t getValueCount(DocId) const override;
+ largeint_t getInt(DocId) const override;
+ double getFloat(DocId) const override;
+ const char * getString(DocId, char *, size_t) const override;
+ uint32_t get(DocId, largeint_t *, uint32_t) const override;
+ uint32_t get(DocId, double *, uint32_t) const override;
+ uint32_t get(DocId, vespalib::string *, uint32_t) const override;
+ uint32_t get(DocId, const char **, uint32_t) const override;
+ uint32_t get(DocId, EnumHandle *, uint32_t) const override;
+ uint32_t get(DocId, WeightedInt *, uint32_t) const;
+ uint32_t get(DocId, WeightedFloat *, uint32_t) const override;
+ uint32_t get(DocId, WeightedString *, uint32_t) const override;
+ uint32_t get(DocId, WeightedConstChar *, uint32_t) const override;
+ uint32_t get(DocId, WeightedEnum *, uint32_t) const override;
+ bool findEnum(const char *, EnumHandle &) const override;
+ long onSerializeForAscendingSort(DocId, void *, long, const common::BlobConverter *) const override;
+ long onSerializeForDescendingSort(DocId, void *, long, const common::BlobConverter *) const override;
+ uint32_t clearDoc(DocId) override;
+ int64_t getDefaultValue() const override;
+ uint32_t getEnum(DocId) const override;
+ void getEnumValue(const EnumHandle *, uint32_t *, uint32_t) const override;
+ bool addDoc(DocId &) override;
+
+ SearchContext::UP getSearch(QueryTermSimple::UP, const SearchContext::Params &) const override;
};
} // namespace search
diff --git a/searchlib/src/vespa/searchlib/tensor/generic_tensor_store.cpp b/searchlib/src/vespa/searchlib/tensor/generic_tensor_store.cpp
index 6e923cc8969..23d515ce4c8 100644
--- a/searchlib/src/vespa/searchlib/tensor/generic_tensor_store.cpp
+++ b/searchlib/src/vespa/searchlib/tensor/generic_tensor_store.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "generic_tensor_store.h"
#include <vespa/vespalib/tensor/tensor.h>
#include <vespa/vespalib/tensor/serialization/typed_binary_format.h>
@@ -8,6 +7,7 @@
#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/vespalib/util/macro.h>
#include <vespa/document/util/serializable.h>
+#include <vespa/document/util/serializableexceptions.h>
#include <vespa/searchlib/datastore/datastore.hpp>
using document::DeserializeException;
diff --git a/searchlib/src/vespa/searchlib/transactionlog/translogclient.cpp b/searchlib/src/vespa/searchlib/transactionlog/translogclient.cpp
index 47a2897fba6..df3aa1404ae 100644
--- a/searchlib/src/vespa/searchlib/transactionlog/translogclient.cpp
+++ b/searchlib/src/vespa/searchlib/transactionlog/translogclient.cpp
@@ -1,9 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/searchlib/transactionlog/translogclient.h>
-#include <vespa/log/log.h>
+#include "translogclient.h"
#include <stdexcept>
+#include <vespa/vespalib/util/stringfmt.h>
+#include <vespa/log/log.h>
LOG_SETUP(".translogclient");
namespace search {
diff --git a/searchlib/src/vespa/searchlib/util/rawbuf.h b/searchlib/src/vespa/searchlib/util/rawbuf.h
index 70778abcd1a..5639914bc80 100644
--- a/searchlib/src/vespa/searchlib/util/rawbuf.h
+++ b/searchlib/src/vespa/searchlib/util/rawbuf.h
@@ -5,6 +5,9 @@
#pragma once
#include <vespa/searchlib/common/hitrank.h>
+#include <stdint.h>
+#include <assert.h>
+#include <sys/types.h>
class FastOS_FileInterface;