Set maximum hit size for the Query
$elastic_rs->size(10)
Offset for Result
Order the Hits in the Elastic response
$elastic_rs->order_by( { "fieldname" => "desc" } )
Query String for Elastic Query String Query
$elastic_rs->query_string('foo*')
add query to Elastic Request
$elastic_rs->query( { match_all => {} } )
add aggregation to Elastic Request
proxy function for "agg"
Adds filter to Elastic Request. Deprecated since Elasticsearch 2.x
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" },
Collects all items, based on query / aggreagtions setted
returns the collected hits from "all" as ArrayRef
returns Aggregation buckets, by Aggregation name
$elastic_rs->buckets('agg_name')
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 } ) )
Deletes Object from Elasticstorage based on a DBIC Resultset
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 }
Indexing huge Resultsets with the Search::Elasticsearch Bulkhelper.
Use this method for bigger Resultlists to speed up Indexing
Builds the document ID for the Elasticstorage based on the columns setted up in the specific ElasticResultSet
returns Search::Elasticsearch Object from Schemastorage
To install DBIx::Class::ElasticSync, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Class::ElasticSync
CPAN shell
perl -MCPAN -e shell install DBIx::Class::ElasticSync
For more information on module installation, please visit the detailed CPAN module installation guide.