Search filters allow you to refine results using logical operators and field conditions, helping you find exactly what you need.

Filter Types

Logical Operators

  • AND: All conditions must match
  • OR: Any condition can match
  • NOR: No conditions should match
  • Nested combinations supported

Field Operators

  • Comparison (eq, neq, gt, lt)
  • Range (gte, lte)
  • Collection (in, nin)
  • Existence & Pattern (exists, regex)

Filter Structure

Supported Operators

Common Use Cases

{
  "filters": {
    "AND": [
      {
        "key": "author",
        "operator": "eq",
        "value": "John Doe"
      },
      {
        "key": "date",
        "operator": "gte",
        "value": "2024-01-01"
      }
    ]
  }
}

Best Practices

1

Use Indexed Fields

Filter on indexed fields for optimal performance

2

Optimize Conditions

Order conditions from most to least selective

3

Combine Related Filters

Group related conditions under single operators

4

Validate Data Types

Ensure correct data types for each operator

Limitations

Be aware of these technical constraints when building filters:

  • Maximum 20 conditions per operator
  • Only indexed fields can be filtered
  • Nested filters have performance impact
  • Case-sensitive filtering requires more resources

For detailed implementation examples, see the Search API Reference.