Skip to content

Filtering records

Aerospike Voyager provides two ways to filter records. Both produce the same underlying expression string that the Aerospike cluster evaluates.

  • The Filters tab is a visual builder for common conditions. Enter field names, pick operators, and enter values without writing any syntax.
  • The Expression tab accepts the full Aerospike Expression Language for advanced queries, including collection data type (CDT) operations and record metadata.

Open the filter panel by clicking the Filter records button in the records toolbar. The panel has two tabs: Filters and Expression.

Filter panel showing the Filters tab with an empty filter row containing Field, Operator (= equals), Value, and Data type (string) inputs, plus Add condition and Apply buttons

Filters tab (visual builder)

The visual filter builder lets you construct filter conditions by entering field names, selecting operators, and entering values. Click Apply to execute the filter against the cluster.

Adding a filter row

  1. Enter a Field name (the bin name to filter on).
  2. Choose an Operator from the dropdown (for example, = equals, > greater than, exists).
  3. Enter a Value if the operator requires one.
  4. Click Add condition to add another filter row.
  5. Click Apply to run the filter.
Filter panel Filters tab with Field age, Operator greater than, Value 30, Data type integer, the generated expression $.age > 30 shown at the bottom, and the Apply button

Available operators

The operator dropdown in the visual builder supports the following operators:

UI labelApplies toDescriptionExample
= equalsString, Integer, FloatExact value matchcountry = US
!= not equalString, Integer, FloatNegated matchstatus != inactive
> greater thanInteger, FloatNumeric greater-thanage > 30
< less thanInteger, FloatNumeric less-thanprice < 50
>= greater than or equalInteger, FloatInclusive greater-thancount >= 10
<= less than or equalInteger, FloatInclusive less-thancount <= 100
is trueBooleanBoolean true checkis_active is true
is falseBooleanBoolean false checkis_active is false
existsAnyBin is present on the recordemail exists
does not existAnyBin is absent from the recordphone does not exist

The visual builder does not filter on Blob bins, or on values inside list or map (CDT) bins. Use the Expression tab to reach CDT elements.

Combining conditions

Use the AND/OR toggle to combine multiple filter rows. The combinator is uniform per query: all rows are joined with AND, or all rows are joined with OR. You cannot mix AND and OR in the visual builder. For mixed logic, use the Expression tab.

Data type

Voyager auto-detects whether the value you enter is an integer, float, or string. A value like 30 is treated as an integer. A value like 3.14 is treated as a float. Everything else is treated as a string.

To override the detected type, use the Data type dropdown next to the value field. This is useful when a numeric-looking value (such as a zip code) should be treated as a string.

Metadata filters

The visual builder currently filters on bin values only. To filter on record metadata (TTL, last update time, or record size), use the Expression tab. See Record metadata below.

Clearing filters

Click Clear all to remove every filter row and return to the unfiltered view. Click Cancel to close the filter panel without applying changes.

To filter on Blob bins or to reach into list or map (CDT) bin contents, use the Expression tab below.

Expression tab (expression editor)

The Expression tab is a free-text editor that accepts the full Aerospike Expression Language. Use it for queries that the visual builder cannot express, such as CDT operations, nested path traversal, and mixed boolean logic.

Syntax basics

In Aerospike Expression Language, the $ prefix denotes a bin reference. For example, $.age > 30 filters records where the age bin exceeds 30.

$.age > 30
$.country == 'US'

Compound conditions use and and or:

$.age > 30 and $.country == 'US'

Comparison operators:

OperatorMeaning
==Equals
!=Not equals
>Greater than
>=Greater than or equal
<Less than
<=Less than or equal

Logical operators: and, or, not(), exclusive()

CDT list access

Access elements in list bins using bracket notation:

$.scores.[0] # by index (first element)
$.scores.[=90] # by value (element equal to 90)
$.scores.[#2] # by rank (third-lowest value)
$.scores.count() # number of elements

CDT map access

Access entries in map bins:

$.user.name # by key
$.user.{0} # by index (first entry)
$.user.count() # number of entries

Nested structures

Combine map and list access for deeply nested data:

$.user.roles.[0] == 'admin'

The in operator

Check if a bin value is in a list of values:

$.status in ['active', 'pending']

Record metadata

Access record-level metadata using function syntax:

$.ttl() > 3600
$.lastUpdate() > 1700000000
$.deviceSize() < 1024
$.setName() == 'users'

Built-in functions

Numeric functions are available for use in expressions:

abs(), ceil(), floor(), log(), min(), max()

When to use the expression editor

Use the Expression tab when you need:

  • CDT operations (list or map access, counts, rank-based lookups)
  • Nested path traversal
  • Record metadata queries
  • Mixed AND/OR logic
  • The in operator or built-in functions

How the two tabs relate

Both tabs produce the same expression string that is sent to the Aerospike cluster. Building a filter in the visual builder populates the Expression tab with the equivalent expression. Editing an expression in the Expression tab updates the visual builder when the expression maps to supported operators.

You can start with the visual builder to learn expression syntax, then switch to the Expression tab for more advanced queries.

Canceling a query

Click the Cancel button in the toolbar to abort a running query at any time.

Bin name validation

Bin names in Aerospike are limited to 15 bytes. The visual builder enforces this limit when you enter a custom bin name.

Next steps

Feedback

Was this page helpful?

What type of feedback are you giving?

What would you like us to know?

+Capture screenshot

Can we reach out to you?