From 8d991c0f1aab66bb961383ab1f1a8ac5278fb3f2 Mon Sep 17 00:00:00 2001 From: Leonardo Menezes <mail@lmenezes.com> Date: Tue, 28 Nov 2017 15:50:33 +0100 Subject: [PATCH] send content type on analyze module closes #232 --- app/elastic/HTTPElasticClient.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/elastic/HTTPElasticClient.scala b/app/elastic/HTTPElasticClient.scala index d04de09..3498b5f 100644 --- a/app/elastic/HTTPElasticClient.scala +++ b/app/elastic/HTTPElasticClient.scala @@ -211,13 +211,13 @@ class HTTPElasticClient @Inject()(client: WSClient) extends ElasticClient { def analyzeTextByField(index: String, field: String, text: String, target: ElasticServer) = { val path = s"/${encoded(index)}/_analyze" val body = Json.obj("text" -> text, "field" -> field).toString() - execute(path, "GET", Some(body), target) + execute(path, "GET", Some(body), target, Seq(JsonContentType)) } def analyzeTextByAnalyzer(index: String, analyzer: String, text: String, target: ElasticServer) = { val path = s"/${encoded(index)}/_analyze" val body = Json.obj("text" -> text, "analyzer" -> analyzer).toString() - execute(path, "GET", Some(body), target) + execute(path, "GET", Some(body), target, Seq(JsonContentType)) } def getClusterSettings(target: ElasticServer) = { -- GitLab