Packagecom.brightcove.api.modules
Classpublic class SearchModule
InheritanceSearchModule Inheritance APIModule Inheritance flash.events.EventDispatcher

API class for handling search methods.



Public Properties
 PropertyDefined By
 Inheritedmodule : Object
[read-only] Returns the instance of the module that is wrapped by this instance.
APIModule
Public Methods
 MethodDefined By
  
SearchModule(module:Object)
Constructor.
SearchModule
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = true):void
[override] Adds a listener for an event.
APIModule
  
findAllVideos(pageSize:uint = 20, pageNumber:uint = 0, sortBy:String = null, sortOrder:String = null, getItemCount:Boolean = false):VideoSearch
Find all videos belonging to a particular publisher id.
SearchModule
  
findRelatedVideos(videoID:Number, pageSize:uint = 20, pageNumber:uint = 0, getItemCount:Boolean = false):VideoSearch
Finds videos related to the given video.
SearchModule
  
findVideosByTags(andTags:Array = null, orTags:Array = null, pageSize:uint = 20, pageNumber:uint = 0, sortBy:String = null, sortOrder:String = null, getItemCount:Boolean = false):VideoSearch
Performs a search on all the tags of the videos in this account, and returns a collection of videos that contain the specified tags.
SearchModule
  
findVideosByText(text:String, pageSize:uint = 20, pageNumber:uint = 0, getItemCount:Boolean = false):VideoSearch
Performs a search through all the given publisher's videos, and returns a collection of videos that match the specified text.
SearchModule
  
Returns the maximum number of videos that will be stored by the SearchManager before being automatically purged.
SearchModule
  
Returns the VideoSearch saved within an object map by the specified ID.
SearchModule
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
[override] Removes a listener for an event.
APIModule
  
setMaxItemsInMemory(max:uint):void
Sets the maximum number of videos that will be stored by the SearchManager before being automatically purged.
SearchModule
Events
 Event Summary Defined By
  Dispatched when an error occurs when performing a search.SearchModule
  Dispatched when a successful search result is returned.SearchModule
Constructor Detail
SearchModule()Constructor
public function SearchModule(module:Object)

Constructor.

Parameters
module:Object — module to wrap with this API class.
Method Detail
findAllVideos()method
public function findAllVideos(pageSize:uint = 20, pageNumber:uint = 0, sortBy:String = null, sortOrder:String = null, getItemCount:Boolean = false):VideoSearch

Find all videos belonging to a particular publisher id.

Parameters

pageSize:uint (default = 20) — of page. Number of entries returned.
 
pageNumber:uint (default = 0) — page to retrieve.
 
sortBy:String (default = null) — to sort the results.
 
sortOrder:String (default = null) — for results.
 
getItemCount:Boolean (default = false) — retrieve the number of videos matching your search criteria.

Returns
VideoSearch
findRelatedVideos()method 
public function findRelatedVideos(videoID:Number, pageSize:uint = 20, pageNumber:uint = 0, getItemCount:Boolean = false):VideoSearch

Finds videos related to the given video. Does a search based on short description, tags, and display name of all videos from this publisher. If the video has nothing related to it, this function will still return videos for being associated with that publisher.

Parameters

videoID:Number — id of the video we'd like related videos for.
 
pageSize:uint (default = 20) — of page. Number of entries returned.
 
pageNumber:uint (default = 0) — page to retrieve.
 
getItemCount:Boolean (default = false) — retrieve the number of videos matching your search criteria.

Returns
VideoSearch
findVideosByTags()method 
public function findVideosByTags(andTags:Array = null, orTags:Array = null, pageSize:uint = 20, pageNumber:uint = 0, sortBy:String = null, sortOrder:String = null, getItemCount:Boolean = false):VideoSearch

Performs a search on all the tags of the videos in this account, and returns a collection of videos that contain the specified tags. Note that tags are case-sensitive.

Parameters

andTags:Array (default = null) — the results to those that contain all of these tags.
 
orTags:Array (default = null) — the results to those that contain at least one of these tags.
 
pageSize:uint (default = 20) — of page. Number of entries returned.
 
pageNumber:uint (default = 0) — page to retrieve.
 
sortBy:String (default = null) — to sort the results.
 
sortOrder:String (default = null) — for results.
 
getItemCount:Boolean (default = false) — retrieve the number of videos matching your search criteria.

Returns
VideoSearch
findVideosByText()method 
public function findVideosByText(text:String, pageSize:uint = 20, pageNumber:uint = 0, getItemCount:Boolean = false):VideoSearch

Performs a search through all the given publisher's videos, and returns a collection of videos that match the specified text.

Parameters

text:String — text we're searching with.
 
pageSize:uint (default = 20) — of page. Number of entries returned.
 
pageNumber:uint (default = 0) — page to retrieve.
 
getItemCount:Boolean (default = false) — retrieve the number of videos matching your search criteria.

Returns
VideoSearch
getMaxItemsInMemory()method 
public function getMaxItemsInMemory():uint

Returns the maximum number of videos that will be stored by the SearchManager before being automatically purged. Once the maxItemsInMemory is reached, VideoSearch objects first created will have their pages purges completely until the number of videos is reduced to be within the maximum setting.

Returns
uint — The maximum number of items managed by the SearchManager.
getVideoSearch()method 
public function getVideoSearch(id:Number):VideoSearch

Returns the VideoSearch saved within an object map by the specified ID.

Parameters

id:Number — ID by which a VideoSearch was saved.

Returns
VideoSearch — The VideoSearch that was saved in an internal object map by the specified ID.
setMaxItemsInMemory()method 
public function setMaxItemsInMemory(max:uint):void

Sets the maximum number of videos that will be stored by the SearchManager before being automatically purged. Once the maxItemsInMemory is reached, VideoSearch objects first created will have their pages purges completely until the number of videos is reduced to be within the maximum setting.

Parameters

max:uint — maximum number of items managed by the SearchManager.

Event Detail
searchError Event
Event Object Type: com.brightcove.api.events.SearchEvent
SearchEvent.type property = com.brightcove.api.events.SearchEvent.ERROR

Dispatched when an error occurs when performing a search.

The SearchEvent.ERROR constant defines the value of the type property of the event object for a searchError event.
searchResult Event  
Event Object Type: com.brightcove.api.events.SearchEvent
SearchEvent.type property = com.brightcove.api.events.SearchEvent.RESULT

Dispatched when a successful search result is returned.

The SearchEvent.RESULT constant defines the value of the type property of the event object for a searchResult event.