New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

omure/scout-advanced-meilisearch

Laravel Scout extension that allows to use meilisearch advanced features as well as has an extended collection driver for testing purposes.
3,870 12

Larablocks Analysis

omure/scout-advanced-meilisearch works with Laravel 9 (latest release v0.5.2, Nov 29, 2022), which reached end of life on Feb 6, 2024: no more fixes, even for security.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • Supports only Laravel 9, past end of life since Feb 6, 2024
  • No release in the last 12 months (last: Nov 29, 2022)
  • 0 downloads a month (needs 10,000)
  • 12 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Nov 29, 2022.
  • No releases in the last 12 months.
  • First released: May 24, 2022.
  • 1 open issue on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 1, 2026.

Install
composer require omure/scout-advanced-meilisearch
Latest Version:v0.5.2
PHP:^8.1
Laravel:9
License:MIT
Last Updated:Mar 6, 2023
Links: GitHub  ·  Packagist
Maintainer: omure

Scout Advanced Meilisearch

What this package provides

Extended scout query builder

Added next changes to the basic query builder:

  1. where('column', '<=', $value) - extended where, which supports 3 optional parameters for comparison. Two parameters are also allowed.
  2. where(Clusure $query) - where can take a closure as the first parameter in order to group queries (the same for orWhere)
  3. whereBetween('column', [$value1, $value2])
  4. whereNotIn('column', [$value1, $value2, $value3])
  5. All where clauses have or variant: orWhere, orWhereIn, etc

Two scout drivers

The drivers are compatible with the new scout builder.

  • meilisearch_advanced
  • collection_advanced
meilisearch_advanced

Uses all the advantages of meilisearch for comparison the results, searching in indexed arrays. Also fixes an issue with the calculation of the total number of values. (The current implementation requests the entire dataset in case scout builder has ->query() method used)

collection_advanced

The driver imitates how meilisearch work and completely relies on collections. It should be used only for tests as the whole searchable models data is in memory. The driver allows testing filtering and sorting as well as Extended scout builder features.

Meilisearch specific are taken into account

Meilisearch requires updating indexes filterable, sortable and searchable attributes in order to save the indexing data properly. This package provides MeiliSearch facade that has updateIndexSettings method that handles that automatically.

How to use?

  1. In config/scout.php set 'driver' to meilisearch_advanced or collection_advanced
  2. Apply Searchable trait to the model (Omure\ScoutAdvancedMeilisearch\Searchable);
  3. For proper handling of the model, implement Omure\ScoutAdvancedMeilisearch\Interfaces\MeiliSearchSearchableModel interface to the model
  4. Describe indexed parameters for searching in toSearchableArray() method of the model (the same way as Scout does)
  5. Specify searchable, filterable and sortable attributes by defining the next list of methods on the model:
  • getSearchableAttributes() - for using search() statements
  • getFilterableAttributes() - for using where(), including whereIn, whereNotIn, etc. statements
  • getSortableAttributes() - for using orderBy() statement
  • getTypoToleranceSettings() - for typo tolerance All methods should return an array of strings which are the names of the parameters specified in toSearchableArray().

If you change the methods getSearchableAttributes(), getFilterableAttributes(), or getSortableAttributes() returned indexes, you have to let meilisearch know about the changes. For that purpose use the facade: MeiliSearch::updateIndexSettings(new User());

The method takes a model instance to update the parameters on the meilisearch server.

Keep in mind that toSearchableArray() doesn't have to have the same indexes as the database column names. You can specify your own logic for searching and filtering. Use the specified parameters in your Scout Builder.

Alternatives to omure/scout-advanced-meilisearch

algolia/scout-extended

Scout Extended extends Laravel Scout adding algolia-specific features

7,648,546 420
zing/laravel-scout-opensearch

Laravel Scout custom engine for OpenSearch

722,975 37
teamtnt/laravel-scout-tntsearch-driver

Driver for Laravel Scout search package based on https://github.com/teamtnt/tnts...

2,909,117 1,133
matchish/laravel-scout-elasticsearch

Search among multiple models with ElasticSearch and Laravel Scout

1,932,508 740
jeroen-g/explorer

Next-gen Elasticsearch driver for Laravel Scout.

813,230 399

Version History

Version Released PHP Laravel License
v0.5.2 ^8.1 ^9.0 MIT
v0.5.1 ^8.1 ^9.0 MIT
v0.5.0 ^8.1 ^9.0 MIT
v0.4.1 ^8.1 ^9.0 MIT
v0.4.0 ^8.1 ^9.0 MIT