Class GeoSearchResultOptions
- java.lang.Object
-
- glide.api.models.commands.geospatial.GeoSearchResultOptions
-
public class GeoSearchResultOptions extends java.lang.ObjectOptional arguments forGeospatialIndicesBaseCommands.geosearch(String, GeoSearchOrigin.SearchOrigin, GeoSearchShape, GeoSearchOptions)command that contains up to 3 optional inputs, including:SortOrderto order the search results by the distance to the center point of the search area.COUNTto limit the number of search results.ANY, which can only be used ifCOUNTis also provided. This option makes the command return as soon as enough matches are found. This means that the results might not be the ones closest to the origin.
- See Also:
- valkey.io
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringANY_VALKEY_APIValkey API keyword used to change search behavior to return as soon as enough matches are found.static java.lang.StringCOUNT_VALKEY_APIValkey API keyword used to perform geosearch with count.
-
Constructor Summary
Constructors Constructor Description GeoSearchResultOptions(long count)Define number of search results.GeoSearchResultOptions(long count, boolean isAny)Define number of search results, and whether or not theANYoption should be used.GeoSearchResultOptions(SortOrder order)Define the sort order only.GeoSearchResultOptions(SortOrder order, long count)Define the sort order and count.GeoSearchResultOptions(SortOrder order, long count, boolean isAny)Configure all parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]toArgs()Converts GeoSearchResultOptions into a String[].
-
-
-
Field Detail
-
COUNT_VALKEY_API
public static final java.lang.String COUNT_VALKEY_API
Valkey API keyword used to perform geosearch with count.- See Also:
- Constant Field Values
-
ANY_VALKEY_API
public static final java.lang.String ANY_VALKEY_API
Valkey API keyword used to change search behavior to return as soon as enough matches are found.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GeoSearchResultOptions
public GeoSearchResultOptions(long count)
Define number of search results.
-
GeoSearchResultOptions
public GeoSearchResultOptions(long count, boolean isAny)Define number of search results, and whether or not theANYoption should be used.
-
GeoSearchResultOptions
public GeoSearchResultOptions(SortOrder order)
Define the sort order only.
-
GeoSearchResultOptions
public GeoSearchResultOptions(SortOrder order, long count)
Define the sort order and count.
-
GeoSearchResultOptions
public GeoSearchResultOptions(SortOrder order, long count, boolean isAny)
Configure all parameters.
-
-