summaryrefslogtreecommitdiffstats
path: root/searchcommon
diff options
context:
space:
mode:
Diffstat (limited to 'searchcommon')
-rw-r--r--searchcommon/src/vespa/searchcommon/attribute/iattributevector.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/searchcommon/src/vespa/searchcommon/attribute/iattributevector.h b/searchcommon/src/vespa/searchcommon/attribute/iattributevector.h
index c7993503107..c432606f7f0 100644
--- a/searchcommon/src/vespa/searchcommon/attribute/iattributevector.h
+++ b/searchcommon/src/vespa/searchcommon/attribute/iattributevector.h
@@ -71,6 +71,11 @@ public:
**/
virtual const vespalib::string & getName() const = 0;
+ vespalib::stringref getNamePrefix() const {
+ vespalib::stringref name = getName();
+ return name.substr(0, name.find('.'));
+ }
+
/**
* Returns the number of documents stored in this attribute vector.
*