Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HSEARCH-3101 Use aliases for backend types and make them point to the…
… right backend factory
- Loading branch information
Showing
11 changed files
with
54 additions
and
10 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
...ain/java/org/hibernate/search/backend/elasticsearch/impl/ElasticsearchBeanConfigurer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Hibernate Search, full-text search for your domain model | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later | ||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. | ||
*/ | ||
package org.hibernate.search.backend.elasticsearch.impl; | ||
|
||
import org.hibernate.search.engine.backend.spi.BackendFactory; | ||
import org.hibernate.search.engine.environment.bean.spi.BeanConfigurationContext; | ||
import org.hibernate.search.engine.environment.bean.spi.BeanConfigurer; | ||
|
||
public class ElasticsearchBeanConfigurer implements BeanConfigurer { | ||
@Override | ||
public void configure(BeanConfigurationContext context) { | ||
context.define( | ||
BackendFactory.class, "elasticsearch", | ||
factoryCreationContext -> new ElasticsearchBackendFactory() | ||
); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...sources/META-INF/services/org.hibernate.search.engine.environment.bean.spi.BeanConfigurer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
org.hibernate.search.backend.elasticsearch.impl.ElasticsearchBeanConfigurer |
21 changes: 21 additions & 0 deletions
21
...d/lucene/src/main/java/org/hibernate/search/backend/lucene/impl/LuceneBeanConfigurer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Hibernate Search, full-text search for your domain model | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later | ||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. | ||
*/ | ||
package org.hibernate.search.backend.lucene.impl; | ||
|
||
import org.hibernate.search.engine.backend.spi.BackendFactory; | ||
import org.hibernate.search.engine.environment.bean.spi.BeanConfigurationContext; | ||
import org.hibernate.search.engine.environment.bean.spi.BeanConfigurer; | ||
|
||
public class LuceneBeanConfigurer implements BeanConfigurer { | ||
@Override | ||
public void configure(BeanConfigurationContext context) { | ||
context.define( | ||
BackendFactory.class, "lucene", | ||
factoryCreationContext -> new LuceneBackendFactory() | ||
); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...sources/META-INF/services/org.hibernate.search.engine.environment.bean.spi.BeanConfigurer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
org.hibernate.search.backend.lucene.impl.LuceneBeanConfigurer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ationtest/backend/elasticsearch/src/test/resources/backend-tck-analysis-custom.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...grationtest/backend/elasticsearch/src/test/resources/backend-tck-multi-tenancy.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
integrationtest/backend/elasticsearch/src/test/resources/backend-tck.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
integrationtest/backend/lucene/src/test/resources/backend-tck-analysis-custom.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
backend.type org.hibernate.search.backend.lucene.impl.LuceneBackendFactory | ||
backend.type lucene | ||
backend.lucene.directory_provider local_directory | ||
backend.lucene.root_directory ${project.build.directory}/test-indexes/#{tck.startup.timestamp}/#{tck.test.id}/ | ||
backend.analysis_configurer org.hibernate.search.integrationtest.backend.lucene.configuration.AnalysisCustomITAnalysisConfigurer |
2 changes: 1 addition & 1 deletion
2
integrationtest/backend/lucene/src/test/resources/backend-tck-multi-tenancy.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
integrationtest/backend/lucene/src/test/resources/backend-tck.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
backend.type org.hibernate.search.backend.lucene.impl.LuceneBackendFactory | ||
backend.type lucene | ||
backend.lucene.directory_provider local_directory | ||
backend.lucene.root_directory ${project.build.directory}/test-indexes/#{tck.startup.timestamp}/#{tck.test.id}/ | ||
backend.analysis_configurer org.hibernate.search.integrationtest.backend.lucene.configuration.DefaultITAnalysisConfigurer |