-
Notifications
You must be signed in to change notification settings - Fork 242
/
ElasticsearchBackendConfiguration.java
39 lines (31 loc) · 1.25 KB
/
ElasticsearchBackendConfiguration.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* 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.util.impl.integrationtest.backend.elasticsearch;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Optional;
import org.hibernate.search.util.impl.integrationtest.backend.elasticsearch.rule.TestElasticsearchClient;
import org.hibernate.search.util.impl.integrationtest.common.rule.BackendConfiguration;
import org.junit.rules.TestRule;
public class ElasticsearchBackendConfiguration extends BackendConfiguration {
protected final TestElasticsearchClient testElasticsearchClient = new TestElasticsearchClient();
@Override
public String toString() {
return "elasticsearch";
}
@Override
public Optional<TestRule> testRule() {
return Optional.of( testElasticsearchClient );
}
@Override
protected Map<String, Object> backendProperties() {
Map<String, Object> properties = new LinkedHashMap<>();
properties.put( "log.json_pretty_printing", "true" );
ElasticsearchTestHostConnectionConfiguration.get().addToBackendProperties( properties );
return properties;
}
}