contentbox.models.search

Interface ISearchAdapter

contentbox.models.search.ISearchAdapter

ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- The official ContentBox Search Interface

Class Attributes:
None
Method Summary
ISearchAdapter refresh()
     If chosen to be implemented, it should refresh search indexes and collections.
any renderSearch(string searchTerm, [numeric max], [numeric offset])
     Render the search results according to the adapter and return HTML.
any renderSearchWithResults(SearchResults searchResults)
     Render the search results according the passed in search results object.
SearchResults search(string searchTerm, [numeric max], [numeric offset], [string siteID])
     Search content and return an standardized ContentBox Results object.

Method Detail

refresh

public ISearchAdapter refresh()

If chosen to be implemented, it should refresh search indexes and collections

Returns:
Itself

renderSearch

public any renderSearch(string searchTerm, [numeric max], [numeric offset])

Render the search results according to the adapter and return HTML

Parameters:
searchTerm - The search term to search on
max - The max results to return if paging
offset - The offset to use in the search results if paging
Returns:
The search html

renderSearchWithResults

public any renderSearchWithResults(SearchResults searchResults)

Render the search results according the passed in search results object

Parameters:
searchResults - The search results object
Returns:
The search html

search

public SearchResults search(string searchTerm, [numeric max], [numeric offset], [string siteID])

Search content and return an standardized ContentBox Results object.

Parameters:
searchTerm - The search term to search on
max - The max results to return if paging
offset - The offset to use in the search results if paging
siteID - The site id to search on if passed
Returns:
SearchResults object with the results