summaryrefslogtreecommitdiff
path: root/src/mongo/db/fts/stemmer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/fts/stemmer.h')
-rw-r--r--src/mongo/db/fts/stemmer.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mongo/db/fts/stemmer.h b/src/mongo/db/fts/stemmer.h
index 59261bfb6a0..80bfdc2faf9 100644
--- a/src/mongo/db/fts/stemmer.h
+++ b/src/mongo/db/fts/stemmer.h
@@ -31,8 +31,6 @@
#pragma once
-#include <string>
-
#include "mongo/base/string_data.h"
#include "mongo/db/fts/fts_language.h"
#include "third_party/libstemmer_c/include/libstemmer.h"
@@ -53,7 +51,14 @@ public:
Stemmer(const FTSLanguage* language);
~Stemmer();
- std::string stem(StringData word) const;
+ /**
+ * Stems an input word.
+ *
+ * The returned StringData is valid until the next call to any method on this object. Since the
+ * input may be returned unmodified, the output's lifetime may also expire when the input's
+ * does.
+ */
+ StringData stem(StringData word) const;
private:
struct sb_stemmer* _stemmer;