Authored by wangnan

修改配置

... ... @@ -29,9 +29,9 @@ public class YohoIndexClientFactoryImpl implements IYohoIndexClientFactory {
*/
@Override
public IElasticsearchClient createIndexClient(Map<String, String> properties, String name) {
String clusterName = properties.get("es.cluster.name");
String clusterName = properties.get("yohomarssearch.es.cluster.name");
clusterName = Configuration.getPropertyValue(clusterName);
String servers = properties.get("es.servers");
String servers = properties.get("yohomarssearch.es.servers");
servers = Configuration.getPropertyValue(servers);
Settings settings = Settings.settingsBuilder().put("cluster.name", clusterName).put("client.transport.ping_timeout", "20s").build();
TransportClient client = TransportClient.builder().settings(settings).build();
... ...
... ... @@ -3,17 +3,17 @@
<client name="yohoSearchElasticsearch">
<factory>com.yohomars.search.index.factory.impl.YohoIndexClientFactoryImpl</factory>
<properties>
<property key="es.cluster.name" value="${search.es.cluster.name}"/>
<property key="es.servers" value="${search.es.servers}"/>
<property key="yohomarssearch.es.cluster.name" value="${yohomarssearch.es.cluster.name}"/>
<property key="yohomarssearch.es.servers" value="${yohomarssearch.es.servers}"/>
</properties>
<index>
<name>bizarea</name>
<properties>
<property key="number_of_shards" value="1"/>
<property key="number_of_replicas" value="${search.index.number_of_replicas}"/>
<property key="refresh_interval" value="${search.index.refresh_interval}"/>
<property key="translog.flush_threshold_ops" value="${search.index.translog.flush_threshold_ops}"/>
<property key="number_of_replicas" value="${yohomarssearch.index.number_of_replicas}"/>
<property key="refresh_interval" value="${yohomarssearch.index.refresh_interval}"/>
<property key="translog.flush_threshold_ops" value="${yohomarssearch.index.translog.flush_threshold_ops}"/>
</properties>
<builderClass>com.yohomars.search.index.builder.impls.BizareaIndexBuilder</builderClass>
<mappingFile>esmapping/bizarea.json</mappingFile>
... ... @@ -23,9 +23,9 @@
<name>comment</name>
<properties>
<property key="number_of_shards" value="1"/>
<property key="number_of_replicas" value="${search.index.number_of_replicas}"/>
<property key="refresh_interval" value="${search.index.refresh_interval}"/>
<property key="translog.flush_threshold_ops" value="${search.index.translog.flush_threshold_ops}"/>
<property key="number_of_replicas" value="${yohomarssearch.index.number_of_replicas}"/>
<property key="refresh_interval" value="${yohomarssearch.index.refresh_interval}"/>
<property key="translog.flush_threshold_ops" value="${yohomarssearch.index.translog.flush_threshold_ops}"/>
</properties>
<builderClass>com.yohomars.search.index.builder.impls.CommentIndexBuilder</builderClass>
<mappingFile>esmapping/comment.json</mappingFile>
... ... @@ -35,9 +35,9 @@
<name>line</name>
<properties>
<property key="number_of_shards" value="1"/>
<property key="number_of_replicas" value="${search.index.number_of_replicas}"/>
<property key="refresh_interval" value="${search.index.refresh_interval}"/>
<property key="translog.flush_threshold_ops" value="${search.index.translog.flush_threshold_ops}"/>
<property key="number_of_replicas" value="${yohomarssearch.index.number_of_replicas}"/>
<property key="refresh_interval" value="${yohomarssearch.index.refresh_interval}"/>
<property key="translog.flush_threshold_ops" value="${yohomarssearch.index.translog.flush_threshold_ops}"/>
</properties>
<builderClass>com.yohomars.search.index.builder.impls.lineIndexBuilder</builderClass>
<mappingFile>esmapping/line.json</mappingFile>
... ... @@ -47,9 +47,9 @@
<name>store</name>
<properties>
<property key="number_of_shards" value="1"/>
<property key="number_of_replicas" value="${search.index.number_of_replicas}"/>
<property key="refresh_interval" value="${search.index.refresh_interval}"/>
<property key="translog.flush_threshold_ops" value="${search.index.translog.flush_threshold_ops}"/>
<property key="number_of_replicas" value="${yohomarssearch.index.number_of_replicas}"/>
<property key="refresh_interval" value="${yohomarssearch.index.refresh_interval}"/>
<property key="translog.flush_threshold_ops" value="${yohomarssearch.index.translog.flush_threshold_ops}"/>
</properties>
<builderClass>com.yohomars.search.index.builder.impls.StoreIndexBuilder</builderClass>
<mappingFile>esmapping/store.json</mappingFile>
... ... @@ -59,9 +59,9 @@
<name>topic</name>
<properties>
<property key="number_of_shards" value="1"/>
<property key="number_of_replicas" value="${search.index.number_of_replicas}"/>
<property key="refresh_interval" value="${search.index.refresh_interval}"/>
<property key="translog.flush_threshold_ops" value="${search.index.translog.flush_threshold_ops}"/>
<property key="number_of_replicas" value="${yohomarssearch.index.number_of_replicas}"/>
<property key="refresh_interval" value="${yohomarssearch.index.refresh_interval}"/>
<property key="translog.flush_threshold_ops" value="${yohomarssearch.index.translog.flush_threshold_ops}"/>
</properties>
<builderClass>com.yohomars.search.index.builder.impls.TopicIndexBuilder</builderClass>
<mappingFile>esmapping/topic.json</mappingFile>
... ...
... ... @@ -3,8 +3,8 @@
<client name="yohoSearchElasticsearch">
<factory>com.yohomars.search.index.factory.impl.YohoIndexClientFactoryImpl</factory>
<properties>
<property key="es.cluster.name" value="yohosearch_test"/>
<property key="es.servers" value="192.168.102.209:9300 192.168.102.216:9300"/>
<property key="yohomarssearch.es.cluster.name" value="yohosearch_test"/>
<property key="yohomarssearch.es.servers" value="192.168.102.209:9300 192.168.102.216:9300"/>
</properties>
<index>
... ...