Command line
Upgrade from version 4 to version 5
Version 5 requires Laravel Scout 11, which replaces thenumericFilters search parameter with filters.
Version 5 includes these breaking changes:
-
The engine sends the
filterssearch parameter instead ofnumericFiltersScout Extended computesfiltersfrom yourwhere,whereIn, andwhereNotInclauses and overwrites any value you pass manually. If you combinedwith(['filters' => ...])withwhereclauses, move all filter conditions into the builder methods:PHP -
filters()returns a string instead of an array If you subclassAlgolia\ScoutExtended\Engines\AlgoliaEngineand override thefilters()method, update it to return a boolean filter expression string, such asviews > 100 AND (id=1 OR id=2), instead of an array.
where method now supports the <, <=, =, !=, >=, and > operators,
and the new whereNotIn method excludes matching values.
For more information, see Server-side search.
Upgrade from version 3 to version 4
Version 4 increases the required minimal versions to PHP 8.1, Laravel 10, and Laravel Scout 10.11.6. Version 4 includes these breaking changes:-
Upgrade the PHP API client to version 4
The version 4 client uses a flat API:
the
SearchIndexclass no longer exists, and all index operations take the index name as their first argument directly on the client. If you access the API directly, upgrade your code. TheAlgolia::indexfacade method now returns the index name as a string instead of aSearchIndexinstance:PHP -
Search callbacks receive the search client instead of an index
The first argument passed to
searchcallbacks is now theSearchClient. Update any callback that used the index objectβs methods:PHP -
Record deletion no longer uses
deleteByby default Deleting records now uses thebrowseObjectsanddeleteObjectsoperations, so your API key needs thebrowsepermission. To restore the previous behavior, setuse_deprecated_delete_bytotruein thealgoliasection of yourconfig/scout.phpfile:PHP