Interface SearchConfig
-
@ConsumerType public interface SearchConfig
Class that represents the overarching Search configuration that may span across components. These methods return the default values set by the Search Results component itself. This class should not take into account HTTP-provided parameters, but rather deal directly with the resource content.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description String
getGuessTotal()
String
getLayout()
The layout derived from the request and if unavailable, then from the configured component state.int
getLimit()
String
getMode()
The mode derived from the request and if unavailable, then from the configured component state.String
getOrderBy()
String
getOrderBySort()
List<String>
getPaths()
org.apache.sling.api.resource.ValueMap
getProperties()
default List<String>
getSearchPredicatesNames()
String
getSearchProviderId()
default org.apache.sling.api.resource.Resource
getSearchResource()
default boolean
isOrderByCase()
Note that ordering case-insensitive with QueryBuilder breaks sorting by anything by text data, so be CAREFUL when implementing this method.
-
-
-
Method Detail
-
getSearchResource
default org.apache.sling.api.resource.Resource getSearchResource()
- Returns:
- the resource that represents the Search Component resource.
-
getProperties
org.apache.sling.api.resource.ValueMap getProperties()
- Returns:
- a value map for the search results component.
-
getMode
String getMode()
The mode derived from the request and if unavailable, then from the configured component state.- Returns:
- the active search mode (ex. search, browse).
-
getLayout
String getLayout()
The layout derived from the request and if unavailable, then from the configured component state.- Returns:
- the active layout mode (ex. card, list)
-
getOrderBy
String getOrderBy()
- Returns:
- the active order by property value.
-
getOrderBySort
String getOrderBySort()
- Returns:
- the active order by sort direction.
-
isOrderByCase
default boolean isOrderByCase()
Note that ordering case-insensitive with QueryBuilder breaks sorting by anything by text data, so be CAREFUL when implementing this method.- Returns:
- true if the sort order is case-sensitive, else false;
-
getLimit
int getLimit()
- Returns:
- the limit of number of results to return for this search.
-
getGuessTotal
String getGuessTotal()
- Returns:
- the configured Guess Total.
-
getSearchProviderId
String getSearchProviderId()
- Returns:
- the default
-
-