summaryrefslogtreecommitdiff
path: root/src/mongo/db/fts/stemmer.h
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2016-03-02 18:31:44 -0500
committerMathias Stearn <mathias@10gen.com>2016-03-11 08:55:40 -0500
commit4b10e50494175df2b1ed8fc4f8e7f8c6ca6f06d5 (patch)
tree5c799a4d1b0b565854687ef4f25f8f3308afd462 /src/mongo/db/fts/stemmer.h
parent72aab77138463d96494389bc538c13395c34a2d3 (diff)
downloadmongo-4b10e50494175df2b1ed8fc4f8e7f8c6ca6f06d5.tar.gz
SERVER-19936 Optimize UnicodeFTSTokenizer
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;