From 246b8c10cd17cab4c8e20e5aaaf129d397b33673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rg=20Prante?= Date: Wed, 13 May 2020 20:44:47 +0200 Subject: [PATCH] cosmetic --- .gitignore | 2 ++ README.adoc | 2 +- .../main/java/org/xbib/elx/api/ExtendedClient.java | 14 ++++++++++++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index bdd8810..314748d 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,7 @@ /.project /.gradle build +out +plugins *.iml *~ diff --git a/README.adoc b/README.adoc index 852224a..aa39fdb 100644 --- a/README.adoc +++ b/README.adoc @@ -1,4 +1,4 @@ -# Elasticsearch Extras - Client +# Elasticsearch Clients image:https://api.travis-ci.org/xbib/content.svg[title="Build status", link="https://travis-ci.org/jprante/elasticsearch-extras-client/"] image:https://img.shields.io/sonar/http/nemo.sonarqube.com/org.xbib%3Aelasticsearch-extras-client/coverage.svg?style=flat-square[title="Coverage", link="https://sonarqube.com/dashboard/index?id=org.xbib%3Aelasticsearch-extras-client"] diff --git a/elx-api/src/main/java/org/xbib/elx/api/ExtendedClient.java b/elx-api/src/main/java/org/xbib/elx/api/ExtendedClient.java index 6114621..d6c761e 100644 --- a/elx-api/src/main/java/org/xbib/elx/api/ExtendedClient.java +++ b/elx-api/src/main/java/org/xbib/elx/api/ExtendedClient.java @@ -121,8 +121,9 @@ public interface ExtendedClient extends Flushable, Closeable { * @param id the id * @param source the source * @return this + * @throws IOException if update fails */ - ExtendedClient update(String index, String id, BytesReference source); + ExtendedClient update(String index, String id, BytesReference source) throws IOException; /** * Update document. Use with precaution! Does not work in all cases. @@ -170,7 +171,7 @@ public interface ExtendedClient extends Flushable, Closeable { * @param index index * @param settings settings * @return this - * @throws IOException if settings/mapping is invalid or index creation fails + * @throws IOException if settings is invalid or index creation fails */ ExtendedClient newIndex(String index, Settings settings) throws IOException; @@ -185,6 +186,15 @@ public interface ExtendedClient extends Flushable, Closeable { */ ExtendedClient newIndex(String index, Settings settings, String mapping) throws IOException; + /** + * Create a new index. + * + * @param index index + * @param settings settings + * @param mapping mapping + * @return this + * @throws IOException if settings/mapping is invalid or index creation fails + */ ExtendedClient newIndex(String index, Settings settings, XContentBuilder mapping) throws IOException; /**