Commit 803ec69a authored by 赵威's avatar 赵威

add printer

parent a68a511e
...@@ -41,8 +41,16 @@ object ESClient { ...@@ -41,8 +41,16 @@ object ESClient {
object ES { object ES {
def test(diaryQuery: String, tractateQuery: String) = { def test(diaryQuery: String, tractateQuery: String) = {
// TODO read from config
val client: ElasticClient = ESClient.create("172.16.52.33", 9200, "elastic", "gengmei!@#") val client: ElasticClient = ESClient.create("172.16.52.33", 9200, "elastic", "gengmei!@#")
val a = multi(
search("gm-dbmw-diary-read").source(diaryQuery),
search("gm-dbmw-tractate-read").source(tractateQuery)
)
println(a.toString())
val resp = client val resp = client
.execute( .execute(
multi( multi(
...@@ -52,7 +60,7 @@ object ES { ...@@ -52,7 +60,7 @@ object ES {
) )
.await .await
println(resp) // println(resp)
resp resp
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment