diff --git a/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/background/task/ReindexSingleIndexerBackgroundTaskExecutorTest.java b/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/background/task/ReindexSingleIndexerBackgroundTaskExecutorTest.java index f3f1b0f5579983..2ec67d0f035113 100644 --- a/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/background/task/ReindexSingleIndexerBackgroundTaskExecutorTest.java +++ b/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/background/task/ReindexSingleIndexerBackgroundTaskExecutorTest.java @@ -7,7 +7,6 @@ import com.liferay.portal.search.elasticsearch7.internal.connection.ElasticsearchConnectionFixture; import com.liferay.portal.search.elasticsearch7.internal.index.FieldMappingAssert; -import com.liferay.portal.search.elasticsearch7.internal.index.constants.LiferayTypeMappingsConstants; import com.liferay.portal.search.elasticsearch7.internal.search.engine.ElasticsearchSearchEngineFixture; import com.liferay.portal.search.test.util.background.task.BaseReindexSingleIndexerBackgroundTaskExecutorTestCase; import com.liferay.portal.test.rule.LiferayUnitTestRule; @@ -53,8 +52,7 @@ protected void assertFieldType(String fieldName, String fieldType) _elasticsearchConnectionFixture.getRestHighLevelClient(); FieldMappingAssert.assertType( - fieldType, fieldName, - LiferayTypeMappingsConstants.LIFERAY_DOCUMENT_TYPE, getIndexName(), + fieldType, fieldName, getIndexName(), restHighLevelClient.indices()); } diff --git a/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/document/SingleFieldFixture.java b/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/document/SingleFieldFixture.java index c2fb384a141f7e..c741d70215a43f 100644 --- a/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/document/SingleFieldFixture.java +++ b/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/document/SingleFieldFixture.java @@ -23,11 +23,9 @@ public class SingleFieldFixture { public SingleFieldFixture( - RestHighLevelClient restHighLevelClient, IndexName indexName, - String type) { + RestHighLevelClient restHighLevelClient, IndexName indexName) { _restHighLevelClient = restHighLevelClient; - _type = type; _index = indexName.getName(); } @@ -73,6 +71,5 @@ private QueryBuilder _createQueryBuilder(String text) { private final String _index; private QueryBuilderFactory _queryBuilderFactory; private final RestHighLevelClient _restHighLevelClient; - private final String _type; } \ No newline at end of file diff --git a/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/index/CompanyIndexFactoryTest.java b/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/index/CompanyIndexFactoryTest.java index b244a7041d2b19..512dc3679a8765 100644 --- a/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/index/CompanyIndexFactoryTest.java +++ b/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/index/CompanyIndexFactoryTest.java @@ -17,7 +17,6 @@ import com.liferay.portal.search.elasticsearch7.internal.connection.ElasticsearchFixture; import com.liferay.portal.search.elasticsearch7.internal.connection.IndexName; import com.liferay.portal.search.elasticsearch7.internal.document.SingleFieldFixture; -import com.liferay.portal.search.elasticsearch7.internal.index.constants.LiferayTypeMappingsConstants; import com.liferay.portal.search.elasticsearch7.internal.query.QueryBuilderFactories; import com.liferay.portal.search.elasticsearch7.internal.util.ResourceUtil; import com.liferay.portal.search.spi.index.listener.CompanyIndexListener; @@ -122,8 +121,7 @@ public void setUp() throws Exception { _singleFieldFixture = new SingleFieldFixture( _elasticsearchFixture.getRestHighLevelClient(), - new IndexName(_companyIndexFactoryFixture.getIndexName()), - LiferayTypeMappingsConstants.LIFERAY_DOCUMENT_TYPE); + new IndexName(_companyIndexFactoryFixture.getIndexName())); _singleFieldFixture.setQueryBuilderFactory(QueryBuilderFactories.MATCH); } @@ -574,8 +572,7 @@ protected void assertAnalyzer(String field, String analyzer) _elasticsearchFixture.getRestHighLevelClient(); FieldMappingAssert.assertAnalyzer( - analyzer, field, LiferayTypeMappingsConstants.LIFERAY_DOCUMENT_TYPE, - _companyIndexFactoryFixture.getIndexName(), + analyzer, field, _companyIndexFactoryFixture.getIndexName(), restHighLevelClient.indices()); } @@ -584,8 +581,7 @@ protected void assertType(String field, String type) throws Exception { _elasticsearchFixture.getRestHighLevelClient(); FieldMappingAssert.assertType( - type, field, LiferayTypeMappingsConstants.LIFERAY_DOCUMENT_TYPE, - _companyIndexFactoryFixture.getIndexName(), + type, field, _companyIndexFactoryFixture.getIndexName(), restHighLevelClient.indices()); } diff --git a/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/index/FieldMappingAssert.java b/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/index/FieldMappingAssert.java index c37b476c127370..07d0dd5f8521ad 100644 --- a/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/index/FieldMappingAssert.java +++ b/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/index/FieldMappingAssert.java @@ -27,17 +27,17 @@ public class FieldMappingAssert { public static void assertAnalyzer( - String expectedValue, String field, String type, String index, + String expectedValue, String field, String index, IndicesClient indicesClient) throws Exception { assertFieldMappingMetadata( - expectedValue, "analyzer", field, type, index, indicesClient); + expectedValue, "analyzer", field, index, indicesClient); } public static void assertFieldMappingMetadata( - String expectedValue, String key, String field, String type, - String index, IndicesClient indicesClient) + String expectedValue, String key, String field, String index, + IndicesClient indicesClient) throws Exception { IdempotentRetryAssert.retryAssert( @@ -47,12 +47,12 @@ public static void assertFieldMappingMetadata( } public static void assertType( - String expectedValue, String field, String type, String index, + String expectedValue, String field, String index, IndicesClient indicesClient) throws Exception { assertFieldMappingMetadata( - expectedValue, "type", field, type, index, indicesClient); + expectedValue, "type", field, index, indicesClient); } private static void _assertFieldMappingMetadata( diff --git a/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/index/LiferayIndexFixture.java b/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/index/LiferayIndexFixture.java index 572b9c623afcda..81250b3babf6c8 100644 --- a/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/index/LiferayIndexFixture.java +++ b/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/index/LiferayIndexFixture.java @@ -8,7 +8,6 @@ import com.liferay.portal.search.elasticsearch7.internal.connection.ElasticsearchFixture; import com.liferay.portal.search.elasticsearch7.internal.connection.IndexCreator; import com.liferay.portal.search.elasticsearch7.internal.connection.IndexName; -import com.liferay.portal.search.elasticsearch7.internal.index.constants.LiferayTypeMappingsConstants; import java.io.IOException; @@ -43,16 +42,15 @@ public void assertAnalyzer(String field, String analyzer) throws Exception { RestHighLevelClient restHighLevelClient = getRestHighLevelClient(); FieldMappingAssert.assertAnalyzer( - analyzer, field, LiferayTypeMappingsConstants.LIFERAY_DOCUMENT_TYPE, - _indexName.getName(), restHighLevelClient.indices()); + analyzer, field, _indexName.getName(), + restHighLevelClient.indices()); } public void assertType(String field, String type) throws Exception { RestHighLevelClient restHighLevelClient = getRestHighLevelClient(); FieldMappingAssert.assertType( - type, field, LiferayTypeMappingsConstants.LIFERAY_DOCUMENT_TYPE, - _indexName.getName(), restHighLevelClient.indices()); + type, field, _indexName.getName(), restHighLevelClient.indices()); } public RestHighLevelClient getRestHighLevelClient() { diff --git a/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/index/LiferayTypeMappingsJapaneseTest.java b/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/index/LiferayTypeMappingsJapaneseTest.java index 06744457f1c214..bc6ab8a4b39aad 100644 --- a/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/index/LiferayTypeMappingsJapaneseTest.java +++ b/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/index/LiferayTypeMappingsJapaneseTest.java @@ -7,7 +7,6 @@ import com.liferay.portal.search.elasticsearch7.internal.connection.IndexName; import com.liferay.portal.search.elasticsearch7.internal.document.SingleFieldFixture; -import com.liferay.portal.search.elasticsearch7.internal.index.constants.LiferayTypeMappingsConstants; import com.liferay.portal.search.elasticsearch7.internal.query.QueryBuilderFactories; import com.liferay.portal.test.rule.LiferayUnitTestRule; @@ -36,8 +35,7 @@ public void setUp() throws Exception { _liferayIndexFixture.setUp(); _singleFieldFixture = new SingleFieldFixture( - _liferayIndexFixture.getRestHighLevelClient(), indexName, - LiferayTypeMappingsConstants.LIFERAY_DOCUMENT_TYPE); + _liferayIndexFixture.getRestHighLevelClient(), indexName); _singleFieldFixture.setField(_PREFIX + "_ja"); _singleFieldFixture.setQueryBuilderFactory(QueryBuilderFactories.MATCH); diff --git a/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/index/LiferayTypeMappingsPrefixPerLanguageTest.java b/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/index/LiferayTypeMappingsPrefixPerLanguageTest.java index 9a91fab33505c4..9429e453177746 100644 --- a/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/index/LiferayTypeMappingsPrefixPerLanguageTest.java +++ b/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/index/LiferayTypeMappingsPrefixPerLanguageTest.java @@ -7,7 +7,6 @@ import com.liferay.portal.search.elasticsearch7.internal.connection.IndexName; import com.liferay.portal.search.elasticsearch7.internal.document.SingleFieldFixture; -import com.liferay.portal.search.elasticsearch7.internal.index.constants.LiferayTypeMappingsConstants; import com.liferay.portal.search.elasticsearch7.internal.query.QueryBuilderFactories; import com.liferay.portal.test.rule.LiferayUnitTestRule; @@ -36,8 +35,7 @@ public void setUp() throws Exception { _liferayIndexFixture.setUp(); _singleFieldFixture = new SingleFieldFixture( - _liferayIndexFixture.getRestHighLevelClient(), indexName, - LiferayTypeMappingsConstants.LIFERAY_DOCUMENT_TYPE); + _liferayIndexFixture.getRestHighLevelClient(), indexName); _singleFieldFixture.setQueryBuilderFactory( QueryBuilderFactories.MATCH_PHRASE_PREFIX); diff --git a/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/synonym/SynonymFiltersTest.java b/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/synonym/SynonymFiltersTest.java index 90e77206a92e3e..3b600feb1e8409 100644 --- a/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/synonym/SynonymFiltersTest.java +++ b/modules/apps/portal-search-elasticsearch7/portal-search-elasticsearch7-impl/src/test/java/com/liferay/portal/search/elasticsearch7/internal/synonym/SynonymFiltersTest.java @@ -10,7 +10,6 @@ import com.liferay.portal.search.elasticsearch7.internal.connection.ElasticsearchFixture; import com.liferay.portal.search.elasticsearch7.internal.connection.IndexName; import com.liferay.portal.search.elasticsearch7.internal.document.SingleFieldFixture; -import com.liferay.portal.search.elasticsearch7.internal.index.constants.LiferayTypeMappingsConstants; import com.liferay.portal.search.elasticsearch7.internal.query.QueryBuilderFactories; import com.liferay.portal.search.elasticsearch7.internal.query.SearchAssert; import com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.ElasticsearchSearchEngineAdapterImpl; @@ -56,8 +55,7 @@ public static void setUpClass() throws Exception { _singleFieldFixture = new SingleFieldFixture( _elasticsearchFixture.getRestHighLevelClient(), - new IndexName(_INDEX_NAME), - LiferayTypeMappingsConstants.LIFERAY_DOCUMENT_TYPE); + new IndexName(_INDEX_NAME)); _singleFieldFixture.setField(_FIELD_NAME); _singleFieldFixture.setQueryBuilderFactory(QueryBuilderFactories.MATCH);