size

Set maximum hit size for the Query

$elastic_rs->size(10)

from

Offset for Result

order_by

Order the Hits in the Elastic response

$elastic_rs->order_by( { "fieldname" => "desc" } )

query_string

Query String for Elastic Query String Query

$elastic_rs->query_string('foo*')

query

add query to Elastic Request

$elastic_rs->query( { match_all => {} } )

agg

add aggregation to Elastic Request

aggregation

proxy function for "agg"

filter

Adds filter to Elastic Request. Deprecated since Elasticsearch 2.x

highlighter

Add the highlighter on $field, must be mapped with term_vector => "with_positions_offsets"

"text" => { type => "string", index => "analyzed", "store" => "yes", "term_vector" => "with_positions_offsets" },

all

Collects all items, based on query / aggreagtions setted

hits

returns the collected hits from "all" as ArrayRef

buckets

returns Aggregation buckets, by Aggregation name

$elastic_rs->buckets('agg_name')

es_index

adds documents from a DBIC Resultset to the Elastic index. It calls the Elastic Resultset es_transform method for denormalizing Data

$elastic_rs->es_index( $dbic_rs->search_rs( { foo => bar } ) )

es_delete

Deletes Object from Elasticstorage based on a DBIC Resultset

es_transform

Helper Function to denormalize Data. Override it in your ElasticResultSet to transform ResultObjects.

sub es_tranform {

	my ( $self, $obj ) = @_;

	$obj->{another_document} = $schema->resultset('MyRS')->find( { id => 5 } )->get_columns

}

es_batch_index

Indexing huge Resultsets with the Search::Elasticsearch Bulkhelper.

Use this method for bigger Resultlists to speed up Indexing

es_id

Builds the document ID for the Elasticstorage based on the columns setted up in the specific ElasticResultSet

returns Search::Elasticsearch Object from Schemastorage