Commit b599f53d authored by 赵威's avatar 赵威

update es query

parent d6eacac5
......@@ -85,15 +85,19 @@ object ESClient {
object ES {
def test() {
val client = ESClient.create("172.16.52.33", 9200, "elastic", "gengmei!@#")
val json =
"""
|{
| "query" : {"bool": {"filter": [
| "terms": {"tags_v3" : ["光子嫩肤", "水光针"]}
| ]}}
|}
|""".stripMargin
val json = """
{
"query": {
"bool": {
"filter": [
{
"terms": { "tags_v3": ["光子嫩肤", "水光针"] }
}
]
}
}
}
"""
val resp = client.execute {
search("gm-dbmw-diary-read").source(json)
......
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