diff options
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/matching/querynodes.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/querynodes.h b/searchcore/src/vespa/searchcore/proton/matching/querynodes.h index b0f844b779c..586ed86e568 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/querynodes.h +++ b/searchcore/src/vespa/searchcore/proton/matching/querynodes.h @@ -67,13 +67,12 @@ public: const FieldEntry *lookupField(uint32_t fieldId) const override final; }; -namespace { -template <typename NodeType> uint32_t numTerms(const NodeType &) { return 1; } +template <typename NodeType> inline uint32_t numTerms(const NodeType &) { return 1; } + template <> -uint32_t numTerms<search::query::Phrase>(const search::query::Phrase &n) { +inline uint32_t numTerms<search::query::Phrase>(const search::query::Phrase &n) { return n.getChildren().size(); } -} // namespace proton::matching::<unnamed> template <typename Base> struct ProtonTermBase : public Base, |