Quellcode durchsuchen

sync up with opensearch 2.9

Shinsuke Sugaya vor 1 Jahr
Ursprung
Commit
4a1a9a4320

+ 1 - 1
module.xml

@@ -6,7 +6,7 @@
 	<!-- Maven Repository -->
 	<property name="maven.snapshot.repo.url" value="https://maven.codelibs.org/" />
 	<property name="maven.release.repo.url" value="https://maven.codelibs.org/" />
-	<property name="opensearch.version" value="2.8.0" />
+	<property name="opensearch.version" value="2.9.0" />
 
 	<target name="install.modules">
 		<mkdir dir="${target.dir}" />

+ 8 - 8
plugin.xml

@@ -17,8 +17,8 @@
 			<param name="plugin.groupId" value="org/codelibs/opensearch" />
 			<param name="plugin.name.prefix" value="opensearch-" />
 			<param name="plugin.name" value="analysis-extension" />
-			<param name="plugin.version" value="2.8.0" />
-			<param name="plugin.zip.version" value="2.8.0" />
+			<param name="plugin.version" value="2.9.0" />
+			<param name="plugin.zip.version" value="2.9.0" />
 		</antcall>
 		<!-- analysis-fess -->
 		<antcall target="install.plugin">
@@ -26,8 +26,8 @@
 			<param name="plugin.groupId" value="org/codelibs/opensearch" />
 			<param name="plugin.name.prefix" value="opensearch-" />
 			<param name="plugin.name" value="analysis-fess" />
-			<param name="plugin.version" value="2.8.0" />
-			<param name="plugin.zip.version" value="2.8.0" />
+			<param name="plugin.version" value="2.9.0" />
+			<param name="plugin.zip.version" value="2.9.0" />
 		</antcall>
 		<!-- configsync -->
 		<antcall target="install.plugin">
@@ -35,8 +35,8 @@
 			<param name="plugin.groupId" value="org/codelibs/opensearch" />
 			<param name="plugin.name.prefix" value="opensearch-" />
 			<param name="plugin.name" value="configsync" />
-			<param name="plugin.version" value="2.8.0" />
-			<param name="plugin.zip.version" value="2.8.0" />
+			<param name="plugin.version" value="2.9.0" />
+			<param name="plugin.zip.version" value="2.9.0" />
 		</antcall>
 		<!-- minhash -->
 		<antcall target="install.plugin">
@@ -44,8 +44,8 @@
 			<param name="plugin.groupId" value="org/codelibs/opensearch" />
 			<param name="plugin.name.prefix" value="opensearch-" />
 			<param name="plugin.name" value="minhash" />
-			<param name="plugin.version" value="2.8.0" />
-			<param name="plugin.zip.version" value="2.8.0" />
+			<param name="plugin.version" value="2.9.0" />
+			<param name="plugin.zip.version" value="2.9.0" />
 		</antcall>
 
 		<antcall target="remove.jars" />

+ 6 - 0
pom.xml

@@ -1007,6 +1007,12 @@
 			<groupId>org.opensearch</groupId>
 			<artifactId>opensearch</artifactId>
 			<version>${opensearch.version}</version>
+			<exclusions>
+				<exclusion>
+					<groupId>jakarta.annotation</groupId>
+					<artifactId>jakarta.annotation-api</artifactId>
+				</exclusion>
+			</exclusions>
 		</dependency>
 		<dependency>
 			<groupId>org.codelibs.opensearch</groupId>

+ 1 - 2
src/main/java/org/codelibs/fess/es/client/SearchEngineClient.java

@@ -157,7 +157,6 @@ import org.opensearch.action.update.UpdateResponse;
 import org.opensearch.client.AdminClient;
 import org.opensearch.client.Client;
 import org.opensearch.cluster.metadata.MappingMetadata;
-import org.opensearch.common.collect.ImmutableOpenMap;
 import org.opensearch.common.document.DocumentField;
 import org.opensearch.common.settings.Settings;
 import org.opensearch.common.settings.Settings.Builder;
@@ -550,7 +549,7 @@ public class SearchEngineClient implements Client {
 
         final GetMappingsResponse getMappingsResponse =
                 client.admin().indices().prepareGetMappings(indexName).execute().actionGet(fessConfig.getIndexIndicesTimeout());
-        final ImmutableOpenMap<String, MappingMetadata> indexMappings = getMappingsResponse.mappings();
+        final Map<String, MappingMetadata> indexMappings = getMappingsResponse.mappings();
         if (indexMappings == null || !indexMappings.containsKey("properties")) {
             String source = null;
             final String mappingFile = getResourcePath(indexConfigPath, fessConfig.getFesenType(), "/" + index + "/" + docType + ".json");

+ 2 - 2
src/main/java/org/codelibs/fess/util/UpgradeUtil.java

@@ -16,6 +16,7 @@
 package org.codelibs.fess.util;
 
 import java.io.File;
+import java.util.Map;
 import java.util.function.Consumer;
 
 import org.apache.logging.log4j.LogManager;
@@ -35,7 +36,6 @@ import org.opensearch.action.support.master.AcknowledgedResponse;
 import org.opensearch.client.Client;
 import org.opensearch.client.IndicesAdminClient;
 import org.opensearch.cluster.metadata.MappingMetadata;
-import org.opensearch.common.collect.ImmutableOpenMap;
 import org.opensearch.common.xcontent.XContentType;
 
 public final class UpgradeUtil {
@@ -93,7 +93,7 @@ public final class UpgradeUtil {
         final FessConfig fessConfig = ComponentUtil.getFessConfig();
         final GetMappingsResponse getMappingsResponse =
                 indicesClient.prepareGetMappings(index).execute().actionGet(fessConfig.getIndexIndicesTimeout());
-        final ImmutableOpenMap<String, MappingMetadata> indexMappings = getMappingsResponse.mappings();
+        final Map<String, MappingMetadata> indexMappings = getMappingsResponse.mappings();
         if (indexMappings == null || !indexMappings.containsKey("properties")) {
             String source = null;
             final String mappingFile = indexResourcePath + "/" + docType + ".json";

+ 0 - 16
src/main/resources/fess_indices/fess/ja/mapping.txt

@@ -1,19 +1,3 @@
-#
-#   Copyright (C) 2016 Shinji Ikeda All Rights Reserved.
-#   Copyright 2009-2017 CodeLibs Project
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
 \u0009 => \u0020
 \u000A => \u0020
 \u000B => \u0020

+ 0 - 15
src/main/resources/fess_indices/fess/mapping.txt

@@ -1,18 +1,3 @@
-#   Copyright (C) 2016 Shinji Ikeda All Rights Reserved.
-#   Copyright 2009-2017 CodeLibs Project
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
 \u0009 => \u0020
 \u000A => \u0020
 \u000B => \u0020