Search
Extends Object. The base search Object is a generic search algorithm returning basic page, category and product results. For more specific or more detailed search algorithms you may wish to look at PageSearch, CategorySearch or ProductSearch.
Methods |
---|
find(String:phrase)
Search
Sets a search phrase for the algorithm to find. Returns the original Search object allowing for method chaining. |
hasNextPage()
Boolean
Returns |
hasPreviousPage()
Boolean
Returns |
hasResults()
Boolean
Returns |
hasSortString(String:value)
Boolean
Returns |
isFirstPage()
Boolean
Returns |
isLastPage()
Boolean
Returns |
length()
Number
The number of items within the current result set. This will be less than or equal to the page size. |
limit(Number:length)
Search
Sets the result set limit to return in the search. |
nextPage()
Number
| null
Returns the Number of the next page in the results sequence. Returns |
nextPageUrl()
Url
| null
Returns the Url of the next page in the results sequence. Returns |
offset(Number:displacement)
Search
Sets the index from which to search from. Offset is zero indexed. |
orderBy(String:order)
Search
Sets the order and direction of the search. The available order strings for this algorithm are:
|
page([Number:num])
Search
Gets or sets the current page number of the search results. |
paginate()
Search
Deprecated. This method no longer has any effect, but remains for backwards compatibility and now returns the original search object. |
perPage([Number:limit])
Search
Gets or sets the result set size per page. |
phrase()
String
The key phrase to find in the search. |
previousPage()
Number
| null
Returns the Number of the previous page in the results sequence. Returns |
previousPageUrl()
Url
| null
Returns the Url of the previous page in the results sequence. Returns |
requestPagination()
Automate
|
results()
SearchCollection
The appropriate collection for the result set. |
sort(String:sortstring)
Alias of |
total()
Number
The total number of results available for the search. |
totalPages()
Number
The total number of pages available for the search. |