Skip to content
Snippets Groups Projects
Commit 8d991c0f authored by Leonardo Menezes's avatar Leonardo Menezes
Browse files

send content type on analyze module

closes #232
parent cbeec92a
No related branches found
No related tags found
No related merge requests found
......@@ -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) = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment