include/SugarSearchEngine/Elastic/Elastica/Result.php

Show: inherited
Table of Contents

Elastica result item

Stores all information from a result

Author
Nicolas Ruflin  
Category
Xodoa  
Package
Elastica  

\Elastica_Result

Package: Elastica

Elastica result item

Stores all information from a result

Author
Nicolas Ruflin  
Category
Xodoa  

Properties

Propertyprotected  $_hit= ''
Details
Type
n/a

Methods

methodpublic__construct( array $hit ) : void

Constructs a single results object

Parameters
Name Type Description
$hit array

Hit data

methodpublic__get( string $key ) : mixed

Magic function to directly access keys inside the result

Returns null if key does not exist

Parameters
Name Type Description
$key string

Key name

Returns
Type Description
mixed Key value
methodpublicgetData( ) : array

Returns result data

Checks for partial result data with getFields, falls back to getSource

Returns
Type Description
array Result data array
methodpublicgetExplanation( ) : array

Returns explanation on how its score was computed.

Returns
Type Description
array explanations
methodpublicgetFields( ) : array

Returns list of fields

Returns
Type Description
array Fields list
methodpublicgetHighlights( ) : array

Returns result data

Returns
Type Description
array Result data array
methodpublicgetHit( ) : array

Returns the raw hit array

Returns
Type Description
array Hit array
methodpublicgetId( ) : string

Returns the hit id.

Returns
Type Description
string Hit id
methodpublicgetIndex( ) : string

Returns the index name of the result

Returns
Type Description
string Index name
methodpublicgetParam( string $name ) : array

Returns a param from the result hit array

This function can be used to retriev all data for which not a specific function exists. If the param does not exists and empty array is retured

Parameters
Name Type Description
$name string

Param name

Returns
Type Description
array Result data
methodpublicgetScore( ) : float

Returns the score of the result

Returns
Type Description
float Results score
methodpublicgetSource( ) : array

Returns the result source

Returns
Type Description
array Source data array
methodpublicgetType( ) : string

Returns results type

Returns
Type Description
string Result type
methodpublicgetVersion( ) : string | int

Returns the version information from the hit

Returns
Type Description
string | int Document version
Documentation was generated by DocBlox 0.18.1.