|
| 1 | +[](https://packagist.org/packages/devloopsnet/laravel-typesense)  |
| 2 | + |
| 3 | +[](https://packagist.org/packages/devloopsnet/laravel-typesense) [](https://packagist.org/packages/devloopsnet/laravel-typesense) |
| 4 | + |
| 5 | + |
1 | 6 | # Laravel Scout Typesense Engine
|
2 | 7 | Typesense engine for laravel/scout https://github.com/typesense/typesense .
|
3 | 8 |
|
4 |
| -This package makes it easy to add full text search support to your models with Laravel 5.3 to 7.0. |
| 9 | +<p align="center"> |
| 10 | + <img src="https://banners.beyondco.de/Typesense%20Driver%20for%20Laravel-Scout.png?theme=dark&packageName=devloopsnet%2Flaravel-typesense&pattern=anchorsAway&style=style_1&description=A+Typesense+%28search+engine%29+driver+for+laravel-scout&md=1&showWatermark=0&fontSize=100px&images=https%3A%2F%2Flaravel.com%2Fimg%2Flogomark.min.svg" alt="laravel-scout-typesense-engine |
| 11 | + socialcard"> |
| 12 | +</p> |
| 13 | +This package makes it easy to add full text search support to your models with Laravel 7.* to 8.*. |
5 | 14 |
|
6 | 15 | ## Contents
|
7 | 16 |
|
@@ -52,22 +61,25 @@ In your `config/scout.php` add:
|
52 | 61 | ```php
|
53 | 62 |
|
54 | 63 | 'typesensesearch' => [
|
55 |
| - 'master_node' => [ |
56 |
| - 'host' => 'HOST', |
57 |
| - 'port' => '8108', |
58 |
| - 'protocol' => 'http', |
59 |
| - 'api_key' => 'API_KEY', |
60 |
| - ], |
61 |
| - 'enabled_read_replica' => FALSE, |
62 |
| - 'read_replica_nodes' => [ |
| 64 | + 'api_key' => 'abcd', |
| 65 | + 'nodes' => [ |
63 | 66 | [
|
64 |
| - 'host' => 'HOST', |
65 |
| - 'port' => '8108', |
| 67 | + 'host' => 'localhost', |
| 68 | + 'port' => '8108', |
| 69 | + 'path' => '', |
66 | 70 | 'protocol' => 'http',
|
67 |
| - 'api_key' => 'API_KEY', |
68 | 71 | ],
|
69 | 72 | ],
|
70 |
| - 'timeout' => 2, |
| 73 | + 'nearest_node' => [ |
| 74 | + 'host' => 'localhost', |
| 75 | + 'port' => '8108', |
| 76 | + 'path' => '', |
| 77 | + 'protocol' => 'http', |
| 78 | + ], |
| 79 | + 'connection_timeout_seconds' => 2, |
| 80 | + 'healthcheck_interval_seconds' => 30, |
| 81 | + 'num_retries' => 3, |
| 82 | + 'retry_interval_seconds' => 1, |
71 | 83 | ],
|
72 | 84 | ```
|
73 | 85 |
|
@@ -106,7 +118,7 @@ class Post extends Model implements TypesenseSearch
|
106 | 118 |
|
107 | 119 | public function getCollectionSchema(): array {
|
108 | 120 | return [
|
109 |
| - 'name' => $this->getTable(), |
| 121 | + 'name' => $this->searchableAs(), |
110 | 122 | 'fields' => [
|
111 | 123 | [
|
112 | 124 | 'name' => 'title',
|
|
0 commit comments