summaryrefslogtreecommitdiffstats
path: root/client/src/main
diff options
context:
space:
mode:
authoryehzu <yehzu2@gmail.com>2021-02-18 17:00:06 +0800
committerTzu-Hui <tzuhuiy@verizonmedia.com>2021-02-18 17:12:07 +0800
commitbe59248995dcc4c18b2e1e35e5a8bdd636bc8137 (patch)
tree2533d4960f87a794ed0e3ccd4527b6b8b7ae4c10 /client/src/main
parentd289e5b8fdfcf5472a2953675994fffe310c469d (diff)
support numberic operation for float
Diffstat (limited to 'client/src/main')
-rw-r--r--client/src/main/java/ai/vespa/client/dsl/Field.java66
1 files changed, 66 insertions, 0 deletions
diff --git a/client/src/main/java/ai/vespa/client/dsl/Field.java b/client/src/main/java/ai/vespa/client/dsl/Field.java
index b12ae51787d..05b85a61bc3 100644
--- a/client/src/main/java/ai/vespa/client/dsl/Field.java
+++ b/client/src/main/java/ai/vespa/client/dsl/Field.java
@@ -396,6 +396,72 @@ public class Field extends QueryChain {
return common("range", annotation, l, new Long[]{m});
}
+ /**
+ * Equal to query.
+ * https://docs.vespa.ai/en/reference/query-language-reference.html#numeric
+ *
+ * @param t the t
+ * @return the query
+ */
+ public Query eq(float t) {
+ return common("=", annotation, t);
+ }
+
+ /**
+ * Greater than or equal to query.
+ * https://docs.vespa.ai/en/reference/query-language-reference.html#numeric
+ *
+ * @param t the t
+ * @return the query
+ */
+ public Query ge(float t) {
+ return common(">=", annotation, t);
+ }
+
+ /**
+ * Greater than query.
+ * https://docs.vespa.ai/en/reference/query-language-reference.html#numeric
+ *
+ * @param t the t
+ * @return the query
+ */
+ public Query gt(float t) {
+ return common(">", annotation, t);
+ }
+
+ /**
+ * Less than or equal to query.
+ * https://docs.vespa.ai/en/reference/query-language-reference.html#numeric
+ *
+ * @param t the t
+ * @return the query
+ */
+ public Query le(float t) {
+ return common("<=", annotation, t);
+ }
+
+ /**
+ * Less than query.
+ * https://docs.vespa.ai/en/reference/query-language-reference.html#numeric
+ *
+ * @param t the t
+ * @return the query
+ */
+ public Query lt(float t) {
+ return common("<", annotation, t);
+ }
+
+ /**
+ * In range query.
+ * https://docs.vespa.ai/en/reference/query-language-reference.html#numeric
+ *
+ * @param l the l
+ * @param m the m
+ * @return the query
+ */
+ public Query inRange(float l, float m) {
+ return common("range", annotation, l, new Float[]{m});
+ }
/**
* Is true query.