Download the PHP package ruger/scout-aws-elastic without Composer
On this page you can find all versions of the php package ruger/scout-aws-elastic. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package scout-aws-elastic
Scout AWS Elasticsearch Driver
This package is a wrapper around babenkoivan/scout-elasticsearch-driver, adding AWS support.
Requirements
The package has been tested with the following configuration:
- PHP version 7.3.*
- Laravel Framework version 6.11
- Elasticsearch version 7.1
Upgrading
If you are upgrading from before version 1.2.4, version 2.0.0 requires the scout_elastic_aws
config file to be re-published or add aws_enabled
key.
Installation
Use composer to install package
Configuration
To configure the package you need to publish the following settings:
After publishing the configuration files, you can configure the connection to your Elasticsearch cluster with the following .env
variables (Replace values with your own values):
Usage
Because this package is a wrapper for babenkoivan/scout-elasticsearch-driver, all usage documentation can be found here
RuleBuilder
The RuleBuilder class can be extended to provide dynamic bool query array generation.
This can be used in conjunction with the rule()
function provided by the ScoutElastic package.
Available Methods:
public function build(array $rules)
- Creates the rule array based on the associative array passed.protected function must(string $field, $value, array $attributes)
- Creates a must match query clause.protected funciton mustNot(string $field, $value, array $attributes)
- Creates a must_not match query clause.protected function should(string $field, $value, array $attributes)
- Creates a should match query clause.protected function filter(string $field, $value, array $attributes)
- Creates a filter term query clause.protected funciton range(string $field, array $values, string type)
- Creates a range query clause.
Example
IndexConfigurator:
Model:
Rule:
Controller:
All versions of scout-aws-elastic with dependencies
laravel/scout Version ^7.0|^8.0
aws/aws-sdk-php Version ^3.0
babenkoivan/scout-elasticsearch-driver Version ^4.3