Skip to content

Commit 32fa5fd

Browse files
committed
readme updated
1 parent 433bab0 commit 32fa5fd

File tree

2 files changed

+17
-21
lines changed

2 files changed

+17
-21
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0.3 - 2024-11-09
2+
3+
- Readme updated
4+
15
## 1.0.2 - 2024-11-09
26

37
- Readme updated

README.md

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@
22

33
[![Latest Stable Version](https://poser.pugx.org/chr15k/laravel-meilisearch-advanced-query/v)](https://packagist.org/packages/chr15k/laravel-meilisearch-advanced-query) [![Total Downloads](https://poser.pugx.org/chr15k/laravel-meilisearch-advanced-query/downloads)](https://packagist.org/packages/chr15k/laravel-meilisearch-advanced-query) [![Latest Unstable Version](https://poser.pugx.org/chr15k/laravel-meilisearch-advanced-query/v/unstable)](https://packagist.org/packages/chr15k/laravel-meilisearch-advanced-query) [![License](https://poser.pugx.org/chr15k/laravel-meilisearch-advanced-query/license)](https://packagist.org/packages/chr15k/laravel-meilisearch-advanced-query) [![PHP Version Require](https://poser.pugx.org/chr15k/laravel-meilisearch-advanced-query/require/php)](https://packagist.org/packages/chr15k/laravel-meilisearch-advanced-query)
44

5-
I wrote this package to help with generating more refined Meilisearch queries using an intuitive query builder (replacing the need to construct your own raw Meilisearh queries when working with Scout's advanced filter option), see the following doc for context: [Customizing Search Engine](https://laravel.com/docs/11.x/scout#customizing-engine-searches), then check out the Usage section below :)
5+
I wrote this package to help with generating more refined Meilisearch queries using an intuitive query builder (replacing the need to construct your own raw Meilisearh queries when working with Scout's advanced filter option), check out the Usage section below :)
66

7-
This packages assumes you have installed and setup [Laravel Scout](https://laravel.com/docs/11.x/scout) with [Meilisearch driver](https://laravel.com/docs/11.x/scout#meilisearch)
7+
---
8+
9+
**NOTE** This packages assumes you have installed and setup the following:
10+
11+
- [Laravel Scout](https://laravel.com/docs/11.x/scout)
12+
- [Meilisearch driver](https://laravel.com/docs/11.x/scout#meilisearch)
13+
14+
---
815

916
###
1017

@@ -16,26 +23,9 @@ composer require chr15k/laravel-meilisearch-advanced-query
1623

1724
## Usage
1825

19-
#### Before
20-
21-
```php
22-
<?php
23-
use App\Models\User;
24-
use Meilisearch\Endpoints\Indexes;
26+
[Go here](https://laravel.com/docs/11.x/scout#customizing-engine-searches) to see how custom search engine queries are used with Laravel Scout.
2527

26-
// raw meilisearch query string
27-
$filter = "(name = 'Chris' OR name = 'Bob') AND verified = 'true'";
28-
29-
User::search($term, function (Indexes $meilisearch, string $query, array $options) use ($filter) {
30-
31-
$options['filter'] = $filter;
32-
$options['sort'] = "[name:desc]";
33-
34-
return $meilisearch->search($query, $options);
35-
})->paginate();
36-
```
37-
38-
#### After
28+
Here's an example of how to use this library with Scout's search method on a model:
3929

4030
```php
4131
<?php
@@ -154,6 +144,8 @@ FilterBuilder::where('email', '[email protected]')
154144

155145
#### # orWhereIsNull(column)
156146

147+
---
148+
157149
### Nested / grouped queries
158150

159151
```php

0 commit comments

Comments
 (0)