Skip to content

Filters

Nitish Goyal edited this page Oct 3, 2018 · 12 revisions

Following filters are currently provided.

Between : This filter is applicable for numeric data types. Filter structure -

{
    "field" : <field_name>,
    "operator" : "between",
    "from" : <start_value>,
    "to" : <end_value>
}

Greater than Equals : This filter is applicable for numeric data types. Filter structure -

{
    "field" : <field_name>,
    "operator" : "greater_equal",
    "value" : <start_value> (including it)
}

Greater Than : This filter is applicable for numeric data types. Filter structure -

{
    "field" : <field_name>,
    "operator" : "greater_than",
    "value" : <start_value> (excluding it)
}

Less than Equals : This filter is applicable for numeric data types. Filter structure -

{
    "field" : <field_name>,
    "operator" : "less_equal",
    "value" : <end_value> (including it)
}

Less Than This filter is applicable for numeric data types. Filter structure -

{
    "field" : <field_name>,
    "operator" : "less_than",
    "value" : <end_value> (excluding it)
}

Less Than : This filter is applicable for numeric data types. Filter structure -

{
    "field" : <field_name>,
    "operator" : "less_than",
    "value" : <end_value> (excluding it)
}

Equals : This filter is applicable for all datatypes. Filter structure -

{
    "field" : <field_name>,
    "operator" : "equals",
    "value" : <value to be compared>
}

Not Equals : This filter is applicable for all datatypes. Filter structure -

{
    "field" : <field_name>,
    "operator" : "not_equals",
    "value" : <value to be compared>
}

Contains : This filter is applicable for string datatype. Filter structure -

{
    "field" : <field_name>,
    "operator" : "contains",
    "value" : <substring to look for>
}

Exists : This filter is used for checking whether a field exists or not. Filter structure -

{
    "field" : <field_name>,
    "operator" : "exists"
}

Missing : This filter is used for checking whether a field is missing or not. Filter structure -

{
    "field" : <field_name>,
    "operator" : "missing"
}

In : This filter is applicable for all datatypes. Filter structure -

{
    "field" : <field_name>,
    "operator" : "in",
    "values" : <list of values>
}

Not In : This filter is applicable for all datatypes. Filter structure -

{
    "field" : <field_name>,
    "operator" : "not_in",
    "values" : <list of values>
}

Last : This filter is applicable for date datatype. Filter structure -

{
    "operator" : "last",
    "duration" : <duration>, //"1h", "1 hour", "2 hours" etc [allowed: "ns|nanosecond(s)| us|microsecond(s)|ms|millisecond(s)|s|second(s)|m|minute(s)|h|hour(s)|d|day(s)"
    "currentTime" : <long timestamp> //Optional: takes current time
}