Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcSearchResult

Search::ezcSearchResult

Class ezcSearchResult

The struct contains the result as parsed by the different search handlers.

Source for this file: /Search/src/structs/search_result.php

Version:   //autogentag//

Member Variables

public array(string=>ezcSearchResultDocument) $documents
The found documents

The key of the array is the document's ID, where the value contains the document, the score and highlighted values.

public string $error
An error message in case a search error occurred
public array(string=>array(string=>mixed)) $facets
A list of facets

The first index is the field on which the facet was generated for, and the element consists of an array where they key is the facet string, and the value is the number of this facet's occurences in the search result.

public int $queryTime
Query time in milliseconds
public int $resultCount
The number of results
public int $start
The index in the result, in case of paging
public int $status
Search status.

Method Summary

public static ezcSearchResult __set_state( $array )
Returns a new instance of this class with the data specified by $array.
public ezcSearchResult __construct( [ $status = 0] , [ $queryTime = 0] , [ $resultCount = 0] , [ $start = 0] , [ $documents = array()] , [ $error = ''] , [ $facets = array()] )
Contructs a new ezcSearchResult.

Methods

__set_state

static ezcSearchResult __set_state( $array )

Returns a new instance of this class with the data specified by $array.

$array contains all the data members of this class in the form: array('member_name'=>value).

__set_state makes this class exportable with var_export. var_export() generates code, that calls this method when it is parsed with PHP.

Parameters:
Name Type Description
$array array(string=>mixed)

__construct

ezcSearchResult __construct( [int $status = 0] , [int $queryTime = 0] , [int $resultCount = 0] , [int $start = 0] , [array $documents = array()] , [string $error = ''] , [array(string=>array(mixed)) $facets = array()] )

Contructs a new ezcSearchResult.

Parameters:
Name Type Description
$status int
$queryTime int
$resultCount int
$start int
$documents array
$error string
$facets array(string=>array(mixed))
Documentation generated by phpDocumentor 1.4.3