Filter Structure
Filters use a boolean logic structure with three main clauses:array
All conditions in this array must be satisfied (AND logic).
array
At least one condition in this array must be satisfied (OR logic).
array
None of the conditions in this array should be satisfied (NOT logic).
Basic Field Matching
Match Single Value
Filter points where a field matches a specific value.Match Any of Multiple Values
Filter points where a field matches any value from a list.Range Filters
Filter numeric fields using range conditions.Greater Than / Less Than
number
Greater than (exclusive).
number
Greater than or equal to (inclusive).
number
Less than (exclusive).
number
Less than or equal to (inclusive).
Geo Filters
Filter points based on geographic location.Geo Radius Filter
Find points within a radius of a geographic coordinate.The
radius is specified in meters. The location field must be stored as a geo point with lon and lat values.Geo Bounding Box Filter
Find points within a rectangular geographic area.Combining Multiple Conditions
AND Logic (must)
All conditions must be satisfied.OR Logic (should)
At least one condition must be satisfied.NOT Logic (must_not)
Exclude points that match these conditions.Advanced Filter Conditions
Check if Field is Empty
Check if Field is Null
Filter by Point IDs
Nested Filters
Filter on nested object properties using dot notation.Complex Filter Example
Combine multiple filter types for complex queries.Best Practices
- Index Payload Fields: Create payload indexes for fields used frequently in filters
- Simple Conditions: Use simple conditions when possible for better performance
- Field Types: Match filter types with payload field types (string, integer, geo, etc.)
- Combine Wisely: Balance between filter specificity and search performance
- Test Performance: Profile complex filters on your dataset to ensure acceptable performance