Skip to content

Commit

Permalink
code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
l-trotta committed Apr 23, 2024
1 parent 5dce3f9 commit 824b277
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package esql.article;
package co.elastic.clients.esql.article;

public record Book(
String title,
Expand All @@ -25,4 +25,5 @@ public record Book(
Integer year,
String publisher,
Float ratings
){}
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package esql.article;
package co.elastic.clients.esql.article;

import co.elastic.clients.elasticsearch.ElasticsearchClient;
import co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester;
Expand All @@ -38,7 +38,6 @@
import org.apache.http.message.BasicHeader;
import org.elasticsearch.client.RestClient;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.IOException;
Expand All @@ -57,7 +56,8 @@ public class EsqlArticle {
public static void main(String[] args) throws IOException, SQLException {
String dir = System.getProperty("user.dir");
Properties prop = new Properties();
Path path = Paths.get(dir,"examples","esql-article","src", "main","resources","application.conf");
Path path = Paths.get(dir, "examples", "esql-article", "src", "main", "resources", "application" +
".conf");
prop.load(new FileInputStream(path.toString()));

String serverUrl = prop.getProperty("server-url");
Expand Down Expand Up @@ -157,7 +157,7 @@ public static void main(String[] args) throws IOException, SQLException {
ResultSet resultSet = client.esql().query(ResultSetEsqlAdapter.INSTANCE, query);

System.out.println("~~~\nResultSet result:");
while(resultSet.next()){
while (resultSet.next()) {
System.out.println(resultSet.getString("title"));
}
}
Expand Down

0 comments on commit 824b277

Please sign in to comment.