aboutsummaryrefslogtreecommitdiffstats
path: root/streamingvisitors/src/vespa/vsm/searcher/futf8strchrfieldsearcher.h
diff options
context:
space:
mode:
Diffstat (limited to 'streamingvisitors/src/vespa/vsm/searcher/futf8strchrfieldsearcher.h')
-rw-r--r--streamingvisitors/src/vespa/vsm/searcher/futf8strchrfieldsearcher.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/streamingvisitors/src/vespa/vsm/searcher/futf8strchrfieldsearcher.h b/streamingvisitors/src/vespa/vsm/searcher/futf8strchrfieldsearcher.h
new file mode 100644
index 00000000000..900ab4c9120
--- /dev/null
+++ b/streamingvisitors/src/vespa/vsm/searcher/futf8strchrfieldsearcher.h
@@ -0,0 +1,26 @@
+// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#pragma once
+
+#include "utf8strchrfieldsearcher.h"
+
+namespace vsm {
+
+class FUTF8StrChrFieldSearcher : public UTF8StrChrFieldSearcher
+{
+public:
+ std::unique_ptr<FieldSearcher> duplicate() const override;
+ FUTF8StrChrFieldSearcher();
+ FUTF8StrChrFieldSearcher(FieldIdT fId);
+ ~FUTF8StrChrFieldSearcher();
+ static bool ansiFold(const char * toFold, size_t sz, char * folded);
+ static bool lfoldaa(const char * toFold, size_t sz, char * folded, size_t & unalignedStart);
+ static bool lfoldua(const char * toFold, size_t sz, char * folded, size_t & alignedStart);
+ private:
+ size_t matchTerm(const FieldRef & f, search::streaming::QueryTerm & qt) override;
+ size_t matchTerms(const FieldRef&, const size_t shortestTerm) override;
+ virtual size_t match(const char *folded, size_t sz, search::streaming::QueryTerm & qt);
+ size_t match(const char *folded, size_t sz, size_t mintsz, search::streaming::QueryTerm ** qtl, size_t qtlSize);
+ std::vector<char> _folded;
+};
+
+}