This is an automated email from the ASF dual-hosted git repository.

airborne pushed a commit to branch clucene-3.1
in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git


The following commit(s) were added to refs/heads/clucene-3.1 by this push:
     new ceffc1cf36f [opt](analyzer) Add analyzer interface methods for text 
processing and tokenization (#361) (#362)
ceffc1cf36f is described below

commit ceffc1cf36f0d22ce47bb17dbff607fa6ac8d5f5
Author: zzzxl <[email protected]>
AuthorDate: Mon Oct 20 14:13:23 2025 +0800

    [opt](analyzer) Add analyzer interface methods for text processing and 
tokenization (#361) (#362)
---
 src/core/CLucene/analysis/AnalysisHeader.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/core/CLucene/analysis/AnalysisHeader.h 
b/src/core/CLucene/analysis/AnalysisHeader.h
index b65e1b74c46..d1dcb966549 100644
--- a/src/core/CLucene/analysis/AnalysisHeader.h
+++ b/src/core/CLucene/analysis/AnalysisHeader.h
@@ -12,6 +12,7 @@
 #include "CLucene/LuceneThreads.h"
 #include "CLucene/util/CLStreams.h"
 
+#include <memory>
 #include <unordered_set>
 
 CL_CLASS_DEF(util,Reader)
@@ -290,6 +291,10 @@ public:
        field name for backward compatibility. */
     virtual TokenStream* tokenStream(const TCHAR* fieldName, 
CL_NS(util)::Reader* reader)=0;
 
+    virtual TokenStream* tokenStream(const TCHAR* fieldName, const 
std::shared_ptr<CL_NS(util)::Reader>& reader) {
+        return tokenStream(fieldName, reader.get());
+    }
+
     /** Creates a TokenStream that is allowed to be re-used
        *  from the previous time that the same thread called
        *  this method.  Callers that do not need to use more
@@ -299,6 +304,10 @@ public:
        */
     virtual TokenStream* reusableTokenStream(const TCHAR* fieldName, 
CL_NS(util)::Reader* reader);
 
+    virtual TokenStream* reusableTokenStream(const TCHAR* fieldName, const 
std::shared_ptr<CL_NS(util)::Reader>& reader) {
+        return reusableTokenStream(fieldName, reader.get());
+    }
+
     virtual void set_lowercase(bool lowercase) {
         _lowercase = lowercase;
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to