Package com.redis.vl.query
Class SortField
java.lang.Object
com.redis.vl.query.SortField
Represents a sort field with its direction.
Python port: Corresponds to tuple (field_name, ascending) in _parse_sort_spec
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SortField
public SortField()
-
-
Method Details
-
asc
Create a SortField with ascending order.- Parameters:
fieldName- Field name- Returns:
- SortField with ascending=true
-
desc
Create a SortField with descending order.- Parameters:
fieldName- Field name- Returns:
- SortField with ascending=false
-
getDirection
Get the direction as a string.- Returns:
- "ASC" or "DESC"
-