CWIS Developer Documentation
Public Member Functions | Public Attributes | List of all members
GlobalSearchEngine Class Reference

Public Member Functions

 GlobalSearchEngine ()
 Constructs a GlobalSearchEngine object. More...
 
 Search ($SearchString, $StartingResult=0, $NumberOfResults=10)
 Performs a keyword search using a specified search string and returns the results, starting with the one numbered with the starting result (default 0) and continuing until reaching the desired number of results (default 10). More...
 
 FieldedSearch ($SearchStrings, $StartingResult=0, $NumberOfResults=10)
 Performs a search across multiple fields and returns the trimmed results to the caller. More...
 
 NumberOfResults ()
 Gets the number of results returned in the last search. More...
 
 SearchTime ()
 Gets the time taken to perform the previous search, in microseconds. More...
 
 PerformSearch ($SetSpec, $StartingResult, $NumberOfResults)
 Performs an OAI-SQ search. More...
 
 SearchSite ($SiteInfo, $SetSpec)
 Searches one site with a specification of subset of records to be retrieved. More...
 
 GetMicrotime ()
 Convenience function for getting the time in microseconds. More...
 

Public Attributes

 $NumberOfResultsAvailable
 
 $LastSearchTime
 

Detailed Description

Definition at line 18 of file GlobalSearchEngine.php.

Member Function Documentation

GlobalSearchEngine::FieldedSearch (   $SearchStrings,
  $StartingResult = 0,
  $NumberOfResults = 10 
)

Performs a search across multiple fields and returns the trimmed results to the caller.

Parameters
array$SearchStringsThe strings to be searche for.
int$StartingResultThe number of the starting result. (OPTIONAL)
int$NumberOfResultsThe number of results to return. (OPTIONAL)
Returns
The results of the fielded search.

Definition at line 66 of file GlobalSearchEngine.php.

GlobalSearchEngine::GetMicrotime ( )

Convenience function for getting the time in microseconds.

Returns
The time in microseconds.

Definition at line 194 of file GlobalSearchEngine.php.

Referenced by Search().

Here is the caller graph for this function:

GlobalSearchEngine::GlobalSearchEngine ( )

Constructs a GlobalSearchEngine object.

Definition at line 25 of file GlobalSearchEngine.php.

GlobalSearchEngine::NumberOfResults ( )

Gets the number of results returned in the last search.

Returns
The number of results returned in the the last search.

Definition at line 74 of file GlobalSearchEngine.php.

References $NumberOfResultsAvailable.

GlobalSearchEngine::PerformSearch (   $SetSpec,
  $StartingResult,
  $NumberOfResults 
)

Performs an OAI-SQ search.

Parameters
string$SetSpecThe specification of a set of OAI resources
int$StartingResultThe number of the starting result.
int$NumberOfResultsThe number of results to retun.
Returns
The results of the specified search.

Compares the search score of two search results.

Parameters
array$ResultAThe first search result to be compared.
array$ResultBThe second search result to be compared.
Returns
1 if $ResultB has a larger search score, -1 if $ResultA has a larger search score, or 0 if the search scores are equal.

Definition at line 98 of file GlobalSearchEngine.php.

References SearchSite().

Referenced by Search().

Here is the caller graph for this function:

GlobalSearchEngine::Search (   $SearchString,
  $StartingResult = 0,
  $NumberOfResults = 10 
)

Performs a keyword search using a specified search string and returns the results, starting with the one numbered with the starting result (default 0) and continuing until reaching the desired number of results (default 10).

Parameters
string$SearchStringThe string to search for.
int$StartingResultThe number of the starting result. (OPTIONAL)
int$NumberOfResultsThe number of results to return. (OPTIONAL)
Returns
The results of the specified search.

Definition at line 39 of file GlobalSearchEngine.php.

References GetMicrotime(), and PerformSearch().

GlobalSearchEngine::SearchSite (   $SiteInfo,
  $SetSpec 
)

Searches one site with a specification of subset of records to be retrieved.

Parameters
array$SiteInfoAn array containing an OAI repository URL
string$SetSpecThe specification of a set of OAI resources
Returns
The results of the search.

Definition at line 143 of file GlobalSearchEngine.php.

Referenced by PerformSearch().

Here is the caller graph for this function:

GlobalSearchEngine::SearchTime ( )

Gets the time taken to perform the previous search, in microseconds.

Returns
The time taken to perform the previous search.

Definition at line 80 of file GlobalSearchEngine.php.

References $LastSearchTime.

Member Data Documentation

GlobalSearchEngine::$LastSearchTime

Definition at line 89 of file GlobalSearchEngine.php.

Referenced by SearchTime().

GlobalSearchEngine::$NumberOfResultsAvailable

Definition at line 88 of file GlobalSearchEngine.php.

Referenced by NumberOfResults().


The documentation for this class was generated from the following file: