contentbox.models.search

Class DBSearch

lucee.Component
    extended by contentbox.models.search.DBSearch
All Implemented Interfaces:
ISearchAdapter

ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- Our DB Search Adapter

Class Attributes:
  • singleton
  •  
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
    Property Summary
    type property default serializable required
    any cb


    • access = public
    • returntype = any
    • inject = id:cbHelper@cb
    true false
    any contentService


    • access = public
    • returntype = any
    • inject = id:contentService@cb
    true false
    any wirebox


    • access = public
    • returntype = any
    • inject = wirebox
    true false
    Constructor Summary
    init()
    Method Summary
    string getCb()
    string getContentService()
    string getWirebox()
    private any highlightSearchTerm(any term, any content)
         Utility function to help you highlight search terms in content.
    ISearchAdapter refresh()
         If chosen to be implemented, it should refresh search indexes and collections.
    any renderSearch(string searchTerm, [numeric max='0'], [numeric offset='0'])
         Render the search results according to the adapter and returns HTML.
    any renderSearchWithResults(SearchResults searchResults)
         Render the search results according the passed in search results object.
    SearchResults search(string searchTerm, [numeric max='0'], [numeric offset='0'])
         Search content and return an standardized ContentBox Results object.
    any setCb(any cb)
    any setContentService(any contentService)
    any setWirebox(any wirebox)
    private any stripHTML([any stringTarget])
         utility to strip HTML.
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init()


    Property Detail

    cb

    property any cb

    Attributes:
    access - public
    required - false
    returntype - any
    inject - id:cbHelper@cb
    serializable - true

    contentService

    property any contentService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - id:contentService@cb
    serializable - true

    wirebox

    property any wirebox

    Attributes:
    access - public
    required - false
    returntype - any
    inject - wirebox
    serializable - true

    Method Detail

    getCb

    public string getCb()


    getContentService

    public string getContentService()


    getWirebox

    public string getWirebox()


    highlightSearchTerm

    private any highlightSearchTerm(any term, any content)

    Utility function to help you highlight search terms in content

    Parameters:
    term - The search term
    content - The content searched

    refresh

    public ISearchAdapter refresh()

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

    Specified by:
    refresh in interface ISearchAdapter

    renderSearch

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

    Render the search results according to the adapter and returns HTML

    Specified by:
    renderSearch in interface ISearchAdapter
    Parameters:
    searchTerm
    max
    offset

    renderSearchWithResults

    public any renderSearchWithResults(SearchResults searchResults)

    Render the search results according the passed in search results object

    Specified by:
    renderSearchWithResults in interface ISearchAdapter
    Parameters:
    searchResults - The search results object

    search

    public SearchResults search(string searchTerm, [numeric max='0'], [numeric offset='0'])

    Search content and return an standardized ContentBox Results object.

    Specified by:
    search in interface ISearchAdapter
    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

    setCb

    public any setCb(any cb)

    Parameters:
    cb

    setContentService

    public any setContentService(any contentService)

    Parameters:
    contentService

    setWirebox

    public any setWirebox(any wirebox)

    Parameters:
    wirebox

    stripHTML

    private any stripHTML([any stringTarget])

    utility to strip HTML

    Parameters:
    stringTarget