Class AggregationQuery

java.lang.Object
com.redis.vl.query.AggregationQuery
Direct Known Subclasses:
HybridQuery

public abstract class AggregationQuery extends Object
Base class for aggregation queries used to create aggregation queries for Redis.

Ported from Python: redisvl/query/aggregate.py:14

Python equivalent:

 class AggregationQuery(AggregateRequest):
     """
     Base class for aggregation queries used to create aggregation queries for Redis.
     """

     def __init__(self, query_string):
         super().__init__(query_string)
 

This is a base class for queries that use Redis aggregation capabilities. Aggregation queries can perform complex data analysis operations like grouping, filtering, sorting, and applying reducer functions.

Since:
0.1.0
See Also:
  • Constructor Details

    • AggregationQuery

      protected AggregationQuery()
      Protected constructor for subclasses.
  • Method Details

    • buildRedisAggregation

      public abstract AggregationBuilder buildRedisAggregation()
      Build the Redis AggregationBuilder for this query.
      Returns:
      the Jedis AggregationBuilder configured for this query
    • buildQueryString

      public abstract String buildQueryString()
      Build the base query string for the aggregation.
      Returns:
      the query string
    • getParams

      public abstract Map<String,Object> getParams()
      Get the parameters for the aggregation query.

      Used for parameterized queries (e.g., vector parameter in HybridQuery).

      Returns:
      a map of parameter names to values