summaryrefslogtreecommitdiffstats
path: root/searchcommon
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahoo-inc.com>2017-03-15 15:30:42 +0000
committerGeir Storli <geirst@yahoo-inc.com>2017-03-15 15:30:42 +0000
commit0cf7b11ee9853cb7872703a93645c67d76f494a3 (patch)
treea74ee968b839f199de2a6ec4ae29763fc963fad0 /searchcommon
parentac342e998ba02c42a7a22651986f1dfaa8131b54 (diff)
Move asDocumentWeightAttribute() to IAttributeVector.
Diffstat (limited to 'searchcommon')
-rw-r--r--searchcommon/src/vespa/searchcommon/attribute/iattributevector.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/searchcommon/src/vespa/searchcommon/attribute/iattributevector.h b/searchcommon/src/vespa/searchcommon/attribute/iattributevector.h
index edc71591175..331e950879a 100644
--- a/searchcommon/src/vespa/searchcommon/attribute/iattributevector.h
+++ b/searchcommon/src/vespa/searchcommon/attribute/iattributevector.h
@@ -11,6 +11,7 @@
namespace search {
+class IDocumentWeightAttribute;
class QueryTermSimple;
namespace attribute {
@@ -255,6 +256,13 @@ public:
const SearchContextParams &params) const = 0;
/**
+ * Type-safe down-cast to an attribute supporting direct document weight iterators.
+ *
+ * @return document weight attribute or nullptr if not supported.
+ */
+ virtual const IDocumentWeightAttribute *asDocumentWeightAttribute() const = 0;
+
+ /**
* Returns the basic type of this attribute vector.
*
* @return basic type