From 7017f90e84c07f5749f0088a1576ec7a4acd1a68 Mon Sep 17 00:00:00 2001 From: francois Date: Mon, 13 Jan 2025 14:50:56 +0100 Subject: [PATCH] search syntax --- .../LSN_20_search-syntax/search-syntax.md | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/content/CTG_50_docs/CTG_10_ui/LSN_20_search-syntax/search-syntax.md b/content/CTG_50_docs/CTG_10_ui/LSN_20_search-syntax/search-syntax.md index 4b623fca..c6df157b 100644 --- a/content/CTG_50_docs/CTG_10_ui/LSN_20_search-syntax/search-syntax.md +++ b/content/CTG_50_docs/CTG_10_ui/LSN_20_search-syntax/search-syntax.md @@ -37,8 +37,9 @@ simple quotes to enclose all textual values (not required for number values) - `like`: partial equals - `is null`: empty value - `is not null`: any non empty value -- `in (...)`: exists in a list of values -- `not in (...)`: not exists in a list of values +- `in ('a','b','c')`: exists in a list of values +- `not in ('a','b','c')`: not exists in a list of values +- `not in`: does not exists in the ENUM field definition Comparators can be combined with logical operators: @@ -62,6 +63,11 @@ Date or datetime interval search syntax is `YYYY-MM-DD[ hh:mm:ss];YYYY-MM-DD[ hh Alternatively you can use search filters named `dmin__` or `dmax__` +### Interval searches on number fields + +Number interval search syntax is `(>12 and <=25) or >100`. +For simple interval (min/max) you can use search filters named `nmin__` or `nmax__` + ### Geographical search As of version 5.3, geographical **coordinates fields** allows proximity search using syntax: @@ -92,8 +98,21 @@ JSON Filters are used in several contexts: API endpoint, link filters, widgets, ```json { + // expression "field1" : ">=1000 and <=5000", + // ordered field "order__field2" : -1, - "group__childField3" : 1 + // date range + "dmin___date1" : "2021-01-01", + "dmax___date2" : "2023-12-31 15:35:00", + // number range + "nmin___number1" : 123, + "nmax___number2" : 456.78, + // use a predefined group-by fields + "group__childField3" : 1, + // or force another group-by on fields + "groupby": true, "groupbyfields": ['myEnumField']", + // meta-object + "mofield": "User#%martin%" } ```