K - Key type.V - Value type.public static class PostProcessingArgs.Builder<K,V> extends Object
PostProcessingArgs.| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
PostProcessingArgs.Builder<K,V> |
addOperation(PostProcessingArgs.PostProcessingOperation<K,?> operation)
Add a post-processing operation to the pipeline.
|
PostProcessingArgs<K,V> |
build()
Build the
PostProcessingArgs. |
PostProcessingArgs.Builder<K,V> |
load(K... fields)
Request loading of document attributes.
|
@SafeVarargs public final PostProcessingArgs.Builder<K,V> load(K... fields)
fields - the field identifierspublic PostProcessingArgs.Builder<K,V> addOperation(PostProcessingArgs.PostProcessingOperation<K,?> operation)
Operations are applied in the order they are added. Supported operations include:
PostProcessingArgs.GroupBy - Group results by properties with optional reducersPostProcessingArgs.Apply - Apply expressions to create computed fieldsPostProcessingArgs.SortBy - Sort results by propertiesPostProcessingArgs.Filter - Filter results by expressions
PostProcessingArgs.<String, String> builder()
.addOperation(GroupBy.of("@category").reduce(Reducer.of(ReduceFunction.COUNT).as("total")))
.addOperation(Apply.of("@price * 0.9", "discounted_price"))
.addOperation(SortBy.of("@discounted_price", SortDirection.DESC))
.addOperation(Filter.of("@discounted_price > 100"))
.build();
operation - the operation to add (GroupBy, Apply, SortBy, Filter, etc.)public PostProcessingArgs<K,V> build()
PostProcessingArgs.PostProcessingArgsCopyright © 2025 lettuce.io. All rights reserved.