aboutsummaryrefslogtreecommitdiffstats
path: root/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_factory.cpp
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2023-10-16 12:58:04 +0200
committerTor Egge <Tor.Egge@online.no>2023-10-16 12:58:04 +0200
commitf67d01124f2a19e77c94039e571db3e4c60f4ed1 (patch)
tree3563782080658bec8986658822c8621e34e79b71 /searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_factory.cpp
parent0ccfe8aab8c12ecd518f882a048f8a13fb2084f1 (diff)
Add linguistics tokens document field writer.
Diffstat (limited to 'searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_factory.cpp')
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_factory.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_factory.cpp b/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_factory.cpp
index 9b7391dd1ab..d19d2994104 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_factory.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_factory.cpp
@@ -9,6 +9,7 @@
#include "geoposdfw.h"
#include "idocsumenvironment.h"
#include "juniperdfw.h"
+#include "linguistics_tokens_dfw.h"
#include "matched_elements_filter_dfw.h"
#include "positionsdfw.h"
#include "rankfeaturesdfw.h"
@@ -84,6 +85,12 @@ DocsumFieldWriterFactory::create_docsum_field_writer(const vespalib::string& fie
} else {
throw_missing_source(command);
}
+ } else if (command == command::linguistics_tokens) {
+ if (!source.empty()) {
+ fieldWriter = std::make_unique<LinguisticsTokensDFW>(source);
+ } else {
+ throw_missing_source(command);
+ }
} else if (command == command::abs_distance) {
if (has_attribute_manager()) {
fieldWriter = AbsDistanceDFW::create(source.c_str(), getEnvironment().getAttributeManager());