@Experimental public class Filter extends Object implements PostProcessingOperation
Filters are applied after the query and relate to the current state of the pipeline. This allows filtering on computed fields created by APPLY operations or reducer results.
{
@code
// Filter by numeric comparison
Filter priceFilter = Filter.of("@price > 100");
// Filter by computed field
Filter totalFilter = Filter.of("@total_value > 1000");
}
PostProcessingOperation| Constructor and Description |
|---|
Filter(String expression)
Creates a new FILTER operation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
build(CommandArgs<?,?> args)
Build the operation arguments into the command args.
|
static Filter |
of(String expression)
Static factory method to create a Filter instance.
|
public Filter(String expression)
expression - the filter expression (e.g., "@price > 100", "@category == 'electronics'")public static Filter of(String expression)
expression - the filter expressionpublic void build(CommandArgs<?,?> args)
PostProcessingOperationbuild in interface PostProcessingOperationargs - the command args to build intoCopyright © 2026 lettuce.io. All rights reserved.