Opensolr as your Laravel Scout engine
laravel-scout-opensolr is a Laravel Scout engine for Opensolr. Every Searchable model gets search by words and meaning together through the standard Model::search(), and one Opensolr Index serves all your models.
Install and set up
composer require opensolr/laravel-scout-opensolr
SCOUT_DRIVER=opensolr
OPENSOLR_EMAIL=you@example.com
OPENSOLR_API_KEY=your-api-key
OPENSOLR_INDEX=my_index
Post::search('how do keyword and meaning search combine?')->get();
Post::search('budget dining')->where('category', 'restaurants')->paginate(15);
Create the index first in the Control Panel, on a server with site search: What your index needs.
What you get
- Hybrid search by default, with
alphafor the balance inconfig/scout-opensolr.php. where()andwhereIn()as filters, with comparison operators, and pagination with real totals.- Documents kept apart per model automatically, so one index covers the whole application.
OpensolrClient::imageToWords(): a photo read into words you can search with.aiAnswer(): a grounded answer written from the best documents. No LLM key needed.- A keyword-only mode that uses none of your AI allowance.
Links
- Laravel product page
- Packagist and GitHub, with the full guide in the README.
- No account yet? Use the public demo account.
Integration pages
- Integrations overview
- LangChain
- LlamaIndex
- Haystack
- Laravel Scout
- MCP for AI agents