I am following the this tutorial on gitHhub
<https://github.com/gphat/wabisabi> Here is the code of EStest.scala
import scala.concurrent.Awaitimport scala.concurrent.duration._
object EStest {val client = new Client("http://localhost:9200")
// Get the cluster's health
client.health()
// Create the index
client.createIndex(name = "foo")
// Verify the index exists
client.verifyIndex("foo").getStatusCode // Should be 200!
// Add a document to the index.
client.index(
index = "foo", `type` = "foo", id = Some("foo"),
data = "{\"foo\":\"bar\"}", refresh = true)
// Fetch that document by it's id.
client.get("foo", "foo", "foo").getResponseBody
// Search for all documents.
client.search("foo", "{\"query\": { \"match_all\": {} }").getResponseBody
// Validate a query.
client.validate(index = "foo", query = "{\"query\": { \"match_all\": {}
}").getStatusCode // Should be 200
// Explain a query.
client.explain(index = "foo", `type` = "foo", id = "foo2", query = "{\"query\":
{ \"term\": { \"foo\":\"bar\"} } }")
// Delete the document.
client.delete("foo", "foo", "foo")
// Delete by query, if you prefer
client.deleteByQuery(Seq("foo"), Seq.empty[String], "{ \"match_all\": {} }")
// Count the matches to a query
client.count(Seq("foo"), Seq("foo"), "{\"query\": { \"match_all\": {}
}").getResponseBody
// Delete the index
client.deleteIndex("foo")}
and following errors occurred
[error] /opt/programs/ES/WabisabiDemo/src/main/scala/EStest.scala:14: value
getStatusCode is not a member of
dispatch.Future[com.ning.http.client.Response][error]
client.verifyIndex("foo").getStatusCode // Should be 200![error]
^[error]
/opt/programs/ES/WabisabiDemo/src/main/scala/EStest.scala:23: value
getResponseBody is not a member of
dispatch.Future[com.ning.http.client.Response][error] client.get("foo", "foo",
"foo").getResponseBody[error] ^[error]
/opt/programs/ES/WabisabiDemo/src/main/scala/EStest.scala:26: value
getResponseBody is not a member of
dispatch.Future[com.ning.http.client.Response][error] client.search("foo",
"{\"query\": { \"match_all\": {} }").getResponseBody[error]
^[error]
/opt/programs/ES/WabisabiDemo/src/main/scala/EStest.scala:29: value
getStatusCode is not a member of
dispatch.Future[com.ning.http.client.Response][error] client.validate(index =
"foo", query = "{\"query\": { \"match_all\": {} }").getStatusCode // Should be
200[error]
^[error] /opt/programs/ES/WabisabiDemo/src/main/scala/EStest.scala:41:
value getResponseBody is not a member of
dispatch.Future[com.ning.http.client.Response][error] client.count(Seq("foo"),
Seq("foo"), "{\"query\": { \"match_all\": {} }").getResponseBody[error]
^[error] 5
errors found[error] (compile:compile) Compilation failed[error] Total time: 17
s, completed Nov 26, 2014 1:54:47 PM
I am not pasting the code of client.scala because it has no errors
,Please help me how can i resolve this error getResponseBody is not a
member of dispatch.Future[com.ning.http.client.Response] and same for
the getStatusCode I am a beginner so i need helpl please help me
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/bb4448ee-c0a2-40a0-be7b-cb219bc0f721%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.