elasticsearch\ActiveRecord arrayAttributes()

arrayAttributes() public method A list of attributes that should be treated as array valued when retrieved through yii\elasticsearch\ActiveQuery::fields(). If not listed by this method, attributes retrieved through yii\elasticsearch\ActiveQuery::fields() will converted to a scalar value when the result array contains only one value. public string[] arrayAttributes ( )return string[] List of attribute names. Must be a subset of attributes().

elasticsearch\ActiveRecord $score

$score public read-only property Returns the score of this record when it was retrieved via a find() query. public float getScore ( )

elasticsearch\ActiveRecord $primaryKey

$primaryKey public property The primary key value. An array (column name => column value) is returned if the primary key is composite or $asArray is true. A string is returned otherwise (null will be returned if the key value is null). public mixed getPrimaryKey ( $asArray = false )public void setPrimaryKey ( $value )

elasticsearch\ActiveRecord $oldPrimaryKey

$oldPrimaryKey public read-only property The old primary key value. An array (column name => column value) is returned if the primary key is composite or $asArray is true. A string is returned otherwise (null will be returned if the key value is null). public mixed getOldPrimaryKey ( $asArray = false )

elasticsearch\ActiveRecord $highlight

$highlight public read-only property A list of arrays with highlighted excerpts indexed by field names. public array|null getHighlight ( )

elasticsearch\ActiveQuery __construct()

__construct() public method Constructor. public void __construct ( $modelClass, $config = [] )$modelClass array The model class associated with this query $config array Configurations to be applied to the newly created query object

elasticsearch\ActiveQuery search()

search() public method Executes the query and returns the complete search result including e.g. hits, facets, totalCount. public array search ( $db = null, $options = [] )$db yii\elasticsearch\Connection The database connection used to execute the query. If this parameter is not given, the elasticsearch application component will be used. $options array The options given with this query. Possible options are: routing search_type return array The query results.

elasticsearch\ActiveQuery populate()

populate() public method (available since version 2.0.4) Converts the raw query results into the format as specified by this query. This method is internally used to convert the data fetched from database into the format as required by this query. public array populate ( $rows )$rows array The raw query result from database return array The converted query result

elasticsearch\ActiveQuery one()

one() public method Executes query and returns a single row of result. public yii\elasticsearch\ActiveRecord|array|null one ( $db = null )$db yii\elasticsearch\Connection The DB connection used to create the DB command. If null, the DB connection returned by $modelClass will be used. return yii\elasticsearch\ActiveRecord|array|null A single row of query result. Depending on the setting of asArray(), the query result may be either an array or an ActiveRecord object. Null will be retur

elasticsearch\ActiveQuery init()

init() public method Initializes the object. This method is called at the end of the constructor. The default implementation will trigger an EVENT_INIT event. If you override this method, make sure you call the parent implementation at the end to ensure triggering of the event. public void init ( )