Commit d5cb7281 authored by Matija Obreza's avatar Matija Obreza
Browse files

Made Elasticsearch HTTP configurable

parent 5381dd7f
...@@ -29,11 +29,17 @@ public class ElasticsearchConfigDev { ...@@ -29,11 +29,17 @@ public class ElasticsearchConfigDev {
@Value("${elasticsearch.cluster.name}") @Value("${elasticsearch.cluster.name}")
private String clusterName; private String clusterName;
/**
* Allow HTTP traffic on port 9200. Useful for querying ES with curl.
*/
@Value("${elasticsearch.enable.http}")
private boolean enableHttp;
@Bean @Bean
public NodeClientFactoryBean ncfb() { public NodeClientFactoryBean ncfb() {
NodeClientFactoryBean ncfb = new NodeClientFactoryBean(true); NodeClientFactoryBean ncfb = new NodeClientFactoryBean(true);
ncfb.setClusterName(clusterName); ncfb.setClusterName(clusterName);
ncfb.setEnableHttp(true); ncfb.setEnableHttp(enableHttp);
return ncfb; return ncfb;
} }
} }
...@@ -138,6 +138,8 @@ cache.tileserver.eviction-policy=LRU ...@@ -138,6 +138,8 @@ cache.tileserver.eviction-policy=LRU
# Connection to Elasticsearch # Connection to Elasticsearch
elasticsearch.cluster.name=es-genesys-development elasticsearch.cluster.name=es-genesys-development
# Allow HTTP connections on port 9200
elasticsearch.enable.http=true
# Connect to external ES nodes. Comma separated list of hostname:port # Connect to external ES nodes. Comma separated list of hostname:port
# elasticsearch.cluster.nodes=localhost:9300,otherhost:9300 # elasticsearch.cluster.nodes=localhost:9300,otherhost:9300
elasticsearch.cluster.nodes= elasticsearch.cluster.nodes=
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment