aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-03-09 18:41:24 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2017-03-09 18:41:24 +0100
commit3045f2928b7b23086c48b14ec680cf509e070747 (patch)
treebc74b27830c5ae9331ab80353b62c81966c3fb5e /searchlib
parentceb7302e1a138130997be0176dd9b06aab33e234 (diff)
override and final.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multinumericattribute.h4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp6
-rw-r--r--searchlib/src/vespa/searchlib/features/dotproductfeature.cpp11
-rw-r--r--searchlib/src/vespa/searchlib/features/dotproductfeature.h39
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/searchiterator.cpp1
5 files changed, 23 insertions, 38 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.h b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.h
index 73429baf4a2..a6be38eaf8f 100644
--- a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.h
+++ b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.h
@@ -60,7 +60,9 @@ protected:
}
public:
- virtual uint32_t getRawValues(DocId doc, const WType * & values) const final;
+ virtual uint32_t getRawValues(DocId doc, const WType * & values) const final {
+ return get(doc, values);
+ }
/*
* Specialization of SearchContext for weighted set type
*/
diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp
index d28945b20ed..f287be4db29 100644
--- a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp
@@ -193,12 +193,6 @@ MultiValueNumericAttribute<B, M>::onInitSave()
}
template <typename B, typename M>
-uint32_t
-MultiValueNumericAttribute<B, M>::getRawValues(DocId doc, const WType * & values) const {
- return get(doc, values);
-}
-
-template <typename B, typename M>
bool MultiValueNumericAttribute<B, M>::SetSearchContext::valid() const { return this->isValid(); }
template <typename B, typename M>
diff --git a/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp b/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp
index 7c1a5f2153c..b7c10e330ba 100644
--- a/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp
+++ b/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp
@@ -170,13 +170,13 @@ SparseDotProductByCopyExecutor<A>::getAttributeValues(uint32_t docId, const AT *
}
-
DotProductBlueprint::DotProductBlueprint() :
Blueprint("dotProduct"),
_defaultAttribute(),
_queryVector()
-{
-}
+{ }
+
+DotProductBlueprint::~DotProductBlueprint() {}
vespalib::string
DotProductBlueprint::getAttribute(const IQueryEnvironment & env) const
@@ -204,6 +204,11 @@ DotProductBlueprint::setup(const IIndexEnvironment & env, const ParameterList &
return true;
}
+ParameterDescriptions
+DotProductBlueprint::getDescriptions() const {
+ return ParameterDescriptions().desc().attribute(ParameterCollection::ANY).string();
+}
+
Blueprint::UP
DotProductBlueprint::createInstance() const
{
diff --git a/searchlib/src/vespa/searchlib/features/dotproductfeature.h b/searchlib/src/vespa/searchlib/features/dotproductfeature.h
index d374c028c82..5ac623082ee 100644
--- a/searchlib/src/vespa/searchlib/features/dotproductfeature.h
+++ b/searchlib/src/vespa/searchlib/features/dotproductfeature.h
@@ -107,7 +107,7 @@ private:
public:
DotProductExecutor(const search::attribute::IAttributeVector * attribute, const Vector & vector);
- virtual void execute(uint32_t docId);
+ void execute(uint32_t docId) override;
};
}
@@ -131,7 +131,7 @@ private:
public:
DotProductExecutor(const A * attribute, const V & vector);
~DotProductExecutor();
- virtual void execute(uint32_t docId);
+ void execute(uint32_t docId) override;
};
template <typename A>
@@ -142,7 +142,7 @@ public:
~DotProductByCopyExecutor();
private:
typedef typename DotProductExecutor<A>::AT AT;
- virtual size_t getAttributeValues(uint32_t docid, const AT * & count);
+ size_t getAttributeValues(uint32_t docid, const AT * & count) final override;
std::vector<typename A::BaseType> _copy;
};
@@ -155,7 +155,7 @@ public:
~SparseDotProductExecutor();
private:
typedef typename DotProductExecutor<A>::AT AT;
- virtual size_t getAttributeValues(uint32_t docid, const AT * & count);
+ size_t getAttributeValues(uint32_t docid, const AT * & count) override;
protected:
IV _indexes;
std::vector<AT> _scratch;
@@ -170,7 +170,7 @@ public:
~SparseDotProductByCopyExecutor();
private:
typedef typename DotProductExecutor<A>::AT AT;
- virtual size_t getAttributeValues(uint32_t docid, const AT * & count);
+ size_t getAttributeValues(uint32_t docid, const AT * & count) final override;
std::vector<typename A::BaseType> _copy;
};
@@ -190,31 +190,16 @@ private:
vespalib::string getAttribute(const fef::IQueryEnvironment & env) const;
public:
- /**
- * Constructs a blueprint.
- */
DotProductBlueprint();
+ ~DotProductBlueprint();
+ void visitDumpFeatures(const fef::IIndexEnvironment & env, fef::IDumpFeatureVisitor & visitor) const override;
+ fef::Blueprint::UP createInstance() const override;
- // Inherit doc from Blueprint.
- virtual void visitDumpFeatures(const fef::IIndexEnvironment & env,
- fef::IDumpFeatureVisitor & visitor) const;
-
- // Inherit doc from Blueprint.
- virtual fef::Blueprint::UP createInstance() const;
-
- // Inherit doc from Blueprint.
- virtual fef::ParameterDescriptions getDescriptions() const {
- return fef::ParameterDescriptions().desc().attribute(fef::ParameterCollection::ANY).string();
- }
-
- // Inherit doc from Blueprint.
- virtual bool setup(const fef::IIndexEnvironment & env,
- const fef::ParameterList & params);
-
- virtual void prepareSharedState(const fef::IQueryEnvironment & queryEnv, fef::IObjectStore & objectStore) const;
+ fef::ParameterDescriptions getDescriptions() const override;
- // Inherit doc from Blueprint.
- virtual fef::FeatureExecutor &createExecutor(const fef::IQueryEnvironment &env, vespalib::Stash &stash) const override;
+ bool setup(const fef::IIndexEnvironment & env, const fef::ParameterList & params) override;
+ void prepareSharedState(const fef::IQueryEnvironment & queryEnv, fef::IObjectStore & objectStore) const override;
+ fef::FeatureExecutor &createExecutor(const fef::IQueryEnvironment &env, vespalib::Stash &stash) const override;
};
diff --git a/searchlib/src/vespa/searchlib/queryeval/searchiterator.cpp b/searchlib/src/vespa/searchlib/queryeval/searchiterator.cpp
index b5b7d24da46..9860105ddc5 100644
--- a/searchlib/src/vespa/searchlib/queryeval/searchiterator.cpp
+++ b/searchlib/src/vespa/searchlib/queryeval/searchiterator.cpp
@@ -51,7 +51,6 @@ SearchIterator::or_hits_into(BitVector &result, uint32_t begin_id)
docid = result.getNextFalseBit(docid);
if (!isAtEnd(docid) && seek(docid)) {
result.setBit(docid);
-// printf("bit %d is hit, _docId=%d, _endId=%d\n", docid, getDocId(), getEndId());
}
docid = std::max(docid + 1, getDocId());
}