Search Object

klevu.extend( target [, object1 ] [, objectN ] )
Returns: Object

Description:  The search object is an implementation of the framework to be used for interacting with the search API and also to manipulate and display the results based on templates.

Search instance (kObject)

  • init – function to be used on a later date
  • getScope – function will return the scope object
  • setScope – function will set the scope object
  • setTarget – function will set the target of the template rendering. it will also set on this node the new kObject , kScope , kElem
  • buildData – function used to return a new data component that can be used in the scope
  • resetData – function used to reset the scope data, used to prepare the scope data for a new request
  • resetTranslator – function used to rebuild the translator and currency objects

All search instances have the same base structure as they are cloned from the original search instance.

All Search instances are added to , it has this format: – It is recommended that any new instance of the search object is added to this.

  • build – true/false – defines if base instance has finished initializing
  • base – the base Search instance – used as a source for cloning 
  • active – null/link to the search instance that is defined as active
  • quick – the first instance of a search box activation
  • landing – a mockup of the base instance- to be used in any landing page
  • extraSearchBox – an array containing all boxes activated via the

The Search object is the object that holds a entire instance of a search. While it has a scope the main functionality of it is to provide a way to manage multiple instances of search each with there own scope and configurations.

Leave a Reply