diff options
author | yehzu <yehzu2@gmail.com> | 2021-09-08 22:29:05 +0800 |
---|---|---|
committer | yehzu <yehzu2@gmail.com> | 2021-09-08 22:29:05 +0800 |
commit | 022a5c2a87b22d77911e0a6eef02f872ddcc0b15 (patch) | |
tree | 1106dee9af0f2020b4ab20a516da6368b24ba8c8 /client/src/test | |
parent | 2de77ba553f7862e24839401cc4fc406806c5581 (diff) |
feat: support geoLocation operator
Diffstat (limited to 'client/src/test')
-rw-r--r-- | client/src/test/groovy/ai/vespa/client/dsl/QTest.groovy | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/client/src/test/groovy/ai/vespa/client/dsl/QTest.groovy b/client/src/test/groovy/ai/vespa/client/dsl/QTest.groovy index d1560937fef..e07e5d6cefc 100644 --- a/client/src/test/groovy/ai/vespa/client/dsl/QTest.groovy +++ b/client/src/test/groovy/ai/vespa/client/dsl/QTest.groovy @@ -244,6 +244,18 @@ class QTest extends Specification { q == """yql=select * from sd1 where weakAnd(f1, f1 contains "v1", f2 contains "v2") and ([{"scoreThreshold":0.13}]weakAnd(f3, f1 contains "v1", f2 contains "v2"));""" } + def "geo location"() { + given: + def q = Q.select("*") + .from("sd1") + .where("a").contains("b").and(Q.geoLocation("taiwan", 25.105497, 121.597366, "200km")) + .semicolon() + .build() + + expect: + q == """yql=select * from sd1 where a contains "b" and geoLocation(taiwan, 25.105497, 121.597366, "200km");""" + } + def "rank with only query"() { given: def q = Q.select("*") |