You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by to...@apache.org on 2021/11/28 12:22:34 UTC

[lucene] branch main updated: Use the same analysis chain to StandardAnalyzer (a follow-up of #480) (#482)

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

tomoko pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/main by this push:
     new cb5f1b6  Use the same analysis chain to StandardAnalyzer (a follow-up of #480) (#482)
cb5f1b6 is described below

commit cb5f1b6ca0cca9dcd9a670e93a2fe809706447b0
Author: Tomoko Uchida <to...@gmail.com>
AuthorDate: Sun Nov 28 21:22:28 2021 +0900

    Use the same analysis chain to StandardAnalyzer (a follow-up of #480) (#482)
---
 .../java/org/apache/lucene/luke/models/analysis/AnalysisImpl.java  | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/lucene/luke/src/java/org/apache/lucene/luke/models/analysis/AnalysisImpl.java b/lucene/luke/src/java/org/apache/lucene/luke/models/analysis/AnalysisImpl.java
index e68383c..fb3a065 100644
--- a/lucene/luke/src/java/org/apache/lucene/luke/models/analysis/AnalysisImpl.java
+++ b/lucene/luke/src/java/org/apache/lucene/luke/models/analysis/AnalysisImpl.java
@@ -41,6 +41,7 @@ import org.apache.lucene.analysis.TokenStream;
 import org.apache.lucene.analysis.Tokenizer;
 import org.apache.lucene.analysis.TokenizerFactory;
 import org.apache.lucene.analysis.custom.CustomAnalyzer;
+import org.apache.lucene.analysis.standard.StandardAnalyzer;
 import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
 import org.apache.lucene.luke.models.LukeException;
 import org.apache.lucene.util.AttributeImpl;
@@ -153,11 +154,7 @@ public final class AnalysisImpl implements Analysis {
   }
 
   private Analyzer defaultAnalyzer() {
-    try {
-      return CustomAnalyzer.builder().withTokenizer("standard").build();
-    } catch (IOException e) {
-      throw new LukeException("Failed to build custom analyzer.", e);
-    }
+    return new StandardAnalyzer();
   }
 
   @Override