update es 2.1
This commit is contained in:
parent
c012170d87
commit
68b1d854c0
2 changed files with 10 additions and 28 deletions
20
pom.xml
20
pom.xml
|
@ -62,8 +62,8 @@
|
|||
<suggest.version>2.0.0</suggest.version>
|
||||
|
||||
<!-- Elasticsearch -->
|
||||
<elasticsearch.version>2.0.0</elasticsearch.version>
|
||||
<cluster.runner.version>2.0.0.0</cluster.runner.version>
|
||||
<elasticsearch.version>2.1.0</elasticsearch.version>
|
||||
<cluster.runner.version>2.1.0.0-SNAPSHOT</cluster.runner.version>
|
||||
|
||||
<!-- Tomcat -->
|
||||
<tomcat.boot.version>0.3.8-RC9</tomcat.boot.version>
|
||||
|
@ -278,18 +278,18 @@
|
|||
<tasks>
|
||||
<mkdir dir="${basedir}/target/plugins" />
|
||||
<get dest="${basedir}/target/plugins">
|
||||
<url url="${maven.release.repo.url}/org/codelibs/elasticsearch-analysis-kuromoji-neologd/2.0.0/elasticsearch-analysis-kuromoji-neologd-2.0.0.zip" />
|
||||
<url url="${maven.release.repo.url}/org/codelibs/elasticsearch-analysis-synonym/2.0.0/elasticsearch-analysis-synonym-2.0.0.zip" />
|
||||
<url url="${maven.release.repo.url}/org/codelibs/elasticsearch-configsync/2.0.0/elasticsearch-configsync-2.0.0.zip" />
|
||||
<url url="${maven.release.repo.url}/org/codelibs/elasticsearch-langfield/2.0.0/elasticsearch-langfield-2.0.0.zip" />
|
||||
<url url="${maven.snapshot.repo.url}/org/codelibs/elasticsearch-analysis-kuromoji-neologd/2.1.0-SNAPSHOT/elasticsearch-analysis-kuromoji-neologd-2.1.0-20151127.223316-1.zip" />
|
||||
<url url="${maven.snapshot.repo.url}/org/codelibs/elasticsearch-analysis-synonym/2.1.0-SNAPSHOT/elasticsearch-analysis-synonym-2.1.0-20151127.081411-1.zip" />
|
||||
<url url="${maven.snapshot.repo.url}/org/codelibs/elasticsearch-configsync/2.1.0-SNAPSHOT/elasticsearch-configsync-2.1.0-20151127.054727-1.zip" />
|
||||
<url url="${maven.snapshot.repo.url}/org/codelibs/elasticsearch-langfield/2.1.0-SNAPSHOT/elasticsearch-langfield-2.1.0-20151129.210553-1.zip" />
|
||||
<url url="http://maven.codelibs.org/archive/elasticsearch/plugin/kopf/elasticsearch-kopf-2.0.0.0.zip" />
|
||||
</get>
|
||||
<delete dir="${basedir}/plugins" />
|
||||
<mkdir dir="${basedir}/plugins" />
|
||||
<unzip dest="${basedir}/plugins/analysis-kuromoji-neologd" src="${basedir}/target/plugins/elasticsearch-analysis-kuromoji-neologd-2.0.0.zip" />
|
||||
<unzip dest="${basedir}/plugins/analysis-synonym" src="${basedir}/target/plugins/elasticsearch-analysis-synonym-2.0.0.zip" />
|
||||
<unzip dest="${basedir}/plugins/configsync" src="${basedir}/target/plugins/elasticsearch-configsync-2.0.0.zip" />
|
||||
<unzip dest="${basedir}/plugins/langfield" src="${basedir}/target/plugins/elasticsearch-langfield-2.0.0.zip" />
|
||||
<unzip dest="${basedir}/plugins/analysis-kuromoji-neologd" src="${basedir}/target/plugins/elasticsearch-analysis-kuromoji-neologd-2.1.0-20151127.223316-1.zip" />
|
||||
<unzip dest="${basedir}/plugins/analysis-synonym" src="${basedir}/target/plugins/elasticsearch-analysis-synonym-2.1.0-20151127.081411-1.zip" />
|
||||
<unzip dest="${basedir}/plugins/configsync" src="${basedir}/target/plugins/elasticsearch-configsync-2.1.0-20151127.054727-1.zip" />
|
||||
<unzip dest="${basedir}/plugins/langfield" src="${basedir}/target/plugins/elasticsearch-langfield-2.1.0-20151129.210553-1.zip" />
|
||||
<unzip dest="${basedir}/plugins/kopf" src="${basedir}/target/plugins/elasticsearch-kopf-2.0.0.0.zip" />
|
||||
</tasks>
|
||||
</configuration>
|
||||
|
|
|
@ -68,7 +68,6 @@ import org.elasticsearch.action.admin.indices.create.CreateIndexResponse;
|
|||
import org.elasticsearch.action.admin.indices.flush.FlushResponse;
|
||||
import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse;
|
||||
import org.elasticsearch.action.admin.indices.mapping.put.PutMappingResponse;
|
||||
import org.elasticsearch.action.admin.indices.optimize.OptimizeResponse;
|
||||
import org.elasticsearch.action.admin.indices.refresh.RefreshResponse;
|
||||
import org.elasticsearch.action.bulk.BulkItemResponse;
|
||||
import org.elasticsearch.action.bulk.BulkItemResponse.Failure;
|
||||
|
@ -715,23 +714,6 @@ public class FessEsClient implements Client {
|
|||
|
||||
}
|
||||
|
||||
public void optimize(final String index) {
|
||||
client.admin().indices().prepareOptimize(index).execute(new ActionListener<OptimizeResponse>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(final OptimizeResponse response) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Optimzed " + index + ".");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(final Throwable e) {
|
||||
logger.error("Failed to optimze " + index + ".", e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public PingResponse ping() {
|
||||
try {
|
||||
final ClusterHealthResponse response = client.admin().cluster().prepareHealth().execute().actionGet();
|
||||
|
|
Loading…
Add table
Reference in a new issue