News

Laravel Scout Adds Typesense, A Lightening-fast Open-source Search

Published
Laravel Scout Adds Typesense, A Lightening-fast Open-source Search image

A recent Laravel Scout release added Typesense, a lightening-fast open-source search alternative to Algolia + Pinecone:

Typesense is a modern, privacy-friendly, open-source search engine meticulously engineered for performance & ease-of-use.

It uses cutting-edge search algorithms that take advantage of the latest advances in Hardware Capabilities & Machine Learning.

What’s neat about Typesense is that you can install and run it as part of your local development environment using a Linux package or Docker on macOS and Windows platforms. See the Local Machine / Self-Hosting documentation for instructions on running Typesense.

On the Laravel Scout side, the Scout documentation includes instructions for configuring Typesense for Scout. Here’s an example of using Typesense to modify search parameters dynamically using the Scout model search:

use App\Models\Todo;
 
Todo::search('Groceries')->withSearchParameters([
'query_by' => 'title, description'
])->get();

This feature was released with Laravel Scout Release v10.7.0. You can learn more about the integration in Pull Request #773.

More generally, you can use Typesense with the typesense/typesense-php composer package, which Scout requires to interact with the Typesense search API. The Typesense documentation (especially the guide) is an excellent place to start to learn more about how to get started with Typesense.

Paul Redmond photo

Staff writer at Laravel News. Full stack web developer and author.

Filed in

Sponsored

laravelcloud logo
Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Visit Laravel Cloud

The latest

View all →
CPX: The Composer Package Executor for PHP image

CPX: The Composer Package Executor for PHP

Read article
Laravel AI SDK Adds Human-in-the-Loop Tool Approval image

Laravel AI SDK Adds Human-in-the-Loop Tool Approval

Read article
Pest 5 Released With Test Impact Analysis, Agent Verification, and Evals image

Pest 5 Released With Test Impact Analysis, Agent Verification, and Evals

Read article
Queue-SQL: Run Mass Deletes and Updates Across Parallel Queue Jobs image

Queue-SQL: Run Mass Deletes and Updates Across Parallel Queue Jobs

Read article
Blade Formatting in Laravel Pint image

Blade Formatting in Laravel Pint

Read article
Inertia DevTools Is Now on the Chrome Web Store image

Inertia DevTools Is Now on the Chrome Web Store

Read article