Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chrysanthos/scout-elastic-app-search-driver
Elastic App Search Driver for Laravel Scout
https://github.com/chrysanthos/scout-elastic-app-search-driver
app-search elastic-app-search elasticsearch hacktoberfest laravel laravel-scout laravel-scout-driver
Last synced: 15 days ago
JSON representation
Elastic App Search Driver for Laravel Scout
- Host: GitHub
- URL: https://github.com/chrysanthos/scout-elastic-app-search-driver
- Owner: chrysanthos
- Created: 2022-02-05T11:55:08.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-12T11:36:55.000Z (almost 3 years ago)
- Last Synced: 2024-12-08T02:04:52.603Z (16 days ago)
- Topics: app-search, elastic-app-search, elasticsearch, hacktoberfest, laravel, laravel-scout, laravel-scout-driver
- Language: PHP
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# Elastic App Search Driver for Laravel Scout
This package is a work in progress. Avoid using this on production environments.
Integrate [Elastic App Search](https://www.elastic.co/enterprise-search) with [Laravel Scout](https://laravel.com/docs/8.x/scout).
This is an early but functional version. Tests to be added.
## Installation
You can install the package via composer:
```bash
composer require chrysanthos/scout-elastic-app-search-driver
```## Usage
In order to use the package, you must set Laravel Scout to use the driver
```dotenv
SCOUT_DRIVER=elastic-app-search
```Then set up the connection details for Elastic App Search
```dotenv
SCOUT_ELASTIC_APP_SEARCH_ENDPOINT=
SCOUT_ELASTIC_APP_SEARCH_API_KEY=
```You must also adjust your `config/scout.php` file so that the chunk sizes are up to 100 records. (This is needed because App Search only allows importing up to 100 records at a time.)
```php
'chunk' => [
'searchable' => 100,
'unsearchable' => 100,
],
```Once you have added the Searchable Trait to your model. You will be able to search with:
```php
$result = Model::search($searchTerm)->get();
```## Testing
```bash
composer test
```## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
## Credits
- [Keoghan Litchfield](https://github.com/konsulting) (Initial work)## Licence
This package is [Treeware](https://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**](https://plant.treeware.earth/chrysanthos/scout-elastic-app-search-driver) to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.