You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2022/06/30 15:01:14 UTC

[james-project] 01/03: JAMES-3785 Remove Redundant SNOWBALL_KEEP_MAIL_AND_URL analyzer in IndexCreationFactory

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

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit dd1add6306f084b92d1a165d3346155bb260c533
Author: Quan Tran <hq...@linagora.com>
AuthorDate: Tue Jun 28 10:27:22 2022 +0700

    JAMES-3785 Remove Redundant SNOWBALL_KEEP_MAIL_AND_URL analyzer in IndexCreationFactory
---
 .../james/backends/es/v7/IndexCreationFactory.java    | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/backends-common/elasticsearch-v7/src/main/java/org/apache/james/backends/es/v7/IndexCreationFactory.java b/backends-common/elasticsearch-v7/src/main/java/org/apache/james/backends/es/v7/IndexCreationFactory.java
index a528f509fa..832f51fcf6 100644
--- a/backends-common/elasticsearch-v7/src/main/java/org/apache/james/backends/es/v7/IndexCreationFactory.java
+++ b/backends-common/elasticsearch-v7/src/main/java/org/apache/james/backends/es/v7/IndexCreationFactory.java
@@ -111,7 +111,7 @@ public class IndexCreationFactory {
                     this.nbReplica = nbReplica;
                     this.waitForActiveShards = waitForActiveShards;
                     this.indexName = indexName;
-                    this.aliases = ImmutableList.builder();;
+                    this.aliases = ImmutableList.builder();
                     this.customAnalyzers = Optional.empty();
                     this.customTokenizers = Optional.empty();
                 }
@@ -251,12 +251,6 @@ public class IndexCreationFactory {
                             .endObject()
                             .rawField(ANALYZER, generateAnalyzers(), XContentType.JSON)
                             .rawField(TOKENIZER, generateTokenizer(), XContentType.JSON)
-                            .startObject("filter")
-                                .startObject(ENGLISH_SNOWBALL)
-                                    .field("type", "snowball")
-                                    .field("language", "English")
-                                .endObject()
-                            .endObject()
                         .endObject()
                     .endObject()
                 .endObject();
@@ -272,15 +266,6 @@ public class IndexCreationFactory {
                             .value("stop")
                         .endArray()
                     .endObject()
-
-                    .startObject(SNOWBALL_KEEP_MAIL_AND_URL)
-                        .field("tokenizer", "uax_url_email")
-                        .startArray("filter")
-                            .value("lowercase")
-                            .value("stop")
-                            .value(ENGLISH_SNOWBALL)
-                        .endArray()
-                    .endObject()
                 .endObject();
 
             return Strings.toString(analyzerBuilder);
@@ -308,8 +293,6 @@ public class IndexCreationFactory {
 
     public static final String CASE_INSENSITIVE = "case_insensitive";
     public static final String KEEP_MAIL_AND_URL = "keep_mail_and_url";
-    public static final String SNOWBALL_KEEP_MAIL_AND_URL = "snowball_keep_mail_and_token";
-    public static final String ENGLISH_SNOWBALL = "english_snowball";
     public static final String BOOLEAN = "boolean";
     public static final String TYPE = "type";
     public static final String LONG = "long";


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org