Fast Search
First-Pass Node Dossier
This page is an evidence-backed node dossier generated from the domain hierarchy and node questionnaire.
What It Is
FastSearch is the storefront search layer that sends shopper queries to Meilisearch, applies location-aware availability and pricing filters, and returns hits, facets, and sort-ready results for product browsing.
Parent hierarchy:
Supporting Platform CapabilitiesSearch And Discovery InfrastructureFast Search
Primary implementation paths:
packages/framework/src/Actions/FastSearch/SearchProducts.phppackages/framework/src/Actions/Product/Requests/Storefront/SearchProducts.phppackages/framework/src/Models/Traits/PyleSearchable.phppackages/framework/src/Listeners/SyncSearchable.phppackages/framework/src/Actions/Searchable/SyncModelToSearchable.phppackages/storefront/src/Livewire/Storefront/FastSearchpackages/storefront/src/Livewire/Storefront/Navigation/SearchForm.phppackages/storefront/src/Livewire/Storefront/FastSearch/ShopByBrand.php
What Users Can Do With It
Direct capabilities
Search code paths can:
- execute storefront product search requests
- search by free text
- apply facets and filter sets
- filter by category, manufacturer, collection, price range, stock state, and customer restrictions
- sort results by price ascending or descending
Indirect capabilities
Other workflows use FastSearch to:
- power the storefront search page
- power the quick search dropdown in storefront navigation
- power category, brand, and collection browse pages
- keep search results aligned with product updates through delayed reindexing
Things users cannot do directly
The shared package does not expose a packaged admin search-management screen. This is a storefront search and indexing layer, not an operator-managed index editor.
Where It Is Managed
| Channel | Role | Notes |
|---|---|---|
| Storefront search page | Direct | Main shopper-facing search experience |
| Storefront navigation search form | Direct | Quick search entry point and dropdown |
| Storefront fast-search wrapper | Direct | Search, filter, and sort orchestration |
| Scout searchable models | Indirect upstream input | Model changes feed the search index |
| Search sync listener | Indirect | Delayed reindexing path for searchable models |
Sources:
packages/storefront/src/Livewire/Storefront/Search/Page.phppackages/storefront/src/Livewire/Storefront/FastSearch/Wrapper.phppackages/storefront/src/Livewire/Storefront/FastSearch/Hits.phppackages/storefront/src/Livewire/Storefront/FastSearch/SearchBar.phppackages/storefront/src/Livewire/Storefront/FastSearch/FiltersBar.phppackages/storefront/src/Livewire/Storefront/FastSearch/FiltersDrawer.phppackages/storefront/src/Livewire/Storefront/FastSearch/FilterByPrice.phppackages/storefront/src/Livewire/Storefront/FastSearch/FilterByFacetFilterList.phppackages/storefront/src/Livewire/Storefront/Navigation/SearchForm.phppackages/framework/src/Models/Traits/PyleSearchable.phppackages/framework/src/Listeners/SyncSearchable.php
Query Behavior
Input contract
The search action accepts:
querypagehitsPerPagefacetsfiltersproduct_category_uuidproduct_collection_uuidproduct_manufacturer_uuidproduct_manufacturer_uuidsprovince_codeminPricemaxPricesortByhasAvailableSamplesinStockcustomer_product_restrictions
Search filter behavior
The primary filter always starts with active = true, then optionally narrows by:
- category
- manufacturer
- collection
- province-aware availability
- province-aware price bounds
- sample availability
- stock state
- customer-specific product restrictions
Facet behavior
Facet filters are translated into Meilisearch filters and re-run so the UI can show updated facet counts for the current selection state.
Sorting behavior
The storefront implementation supports:
price_ascprice_desc
When a province code is available, price sorting uses the province-specific price field.
Sources:
packages/framework/src/Actions/FastSearch/SearchProducts.phppackages/storefront/src/Livewire/Storefront/FastSearch/Wrapper.phppackages/storefront/src/Livewire/Storefront/FastSearch/FilterByPrice.phppackages/storefront/src/Livewire/Storefront/FastSearch/FilterByFacetFilterList.php
Searchability And Sync
PyleSearchable is the model trait that hooks models into Scout search indexing.
Key behavior:
- it uses the configured Scout driver
- it updates search indexes when searchable models change
- it always indexes newly created searchable models
- it handles soft-delete changes specially
Search updates are delayed through SyncSearchableRequested and SyncModelToSearchable, so the storefront index is not updated synchronously on every model change.
Sources:
packages/framework/src/Models/Traits/PyleSearchable.phppackages/framework/src/Listeners/SyncSearchable.phppackages/framework/src/Actions/Searchable/SyncModelToSearchable.phppackages/framework/src/Events/SyncSearchableRequested.php
Low-Level Model Search Versus Storefront Fast Search
The repo contains two different search patterns:
- model-level
search()calls, which controllers use to find record IDs for admin or storefront lists - the storefront
Fast Searchexperience, which usesFastSearch/SearchProductsto drive shopper browsing, filtering, and sorting against Meilisearch
Model-level search appears in multiple controller request handlers, including product, category, manufacturer, customer, shipping, and order-related endpoints. That pattern is useful for pickers and filtered lists, but it is not the same thing as the shopper-facing fast-search flow.
Sources:
packages/framework/src/Http/Controllers/Api/Admin/ProductsController.phppackages/framework/src/Http/Controllers/Api/Admin/ProductCategoriesController.phppackages/framework/src/Http/Controllers/Api/Admin/ProductManufacturersController.phppackages/framework/src/Http/Controllers/Api/Admin/CustomerGroupsController.phppackages/framework/src/Http/Controllers/Api/Admin/ShippingMethodsController.phppackages/framework/src/Actions/Order/Requests/Admin/Index.phppackages/framework/src/Actions/Cart/Requests/Storefront/IndexRequest.phppackages/framework/src/Actions/FastSearch/SearchProducts.phppackages/framework/src/Actions/Product/Requests/Storefront/SearchProducts.php
Rules And Downstream Effects
Rate limiting and caching
The search action enforces rate limiting and caches eligible responses.
Location-aware filtering
When a province code is present, search results are filtered and sorted against province-specific availability and pricing fields.
Shopper context
The storefront search wrapper also injects shopper context such as:
- current locale
- shipping postal code province
- selected manufacturer, category, or collection
Sources:
packages/framework/src/Actions/FastSearch/SearchProducts.phppackages/storefront/src/Livewire/Storefront/FastSearch/Wrapper.phppackages/storefront/src/Livewire/Storefront/FastSearch/Hits.php
Integrations And Automation
Meilisearch-backed search
The storefront search action sends queries to Meilisearch and uses multi-search to calculate facet distributions alongside the primary hit set.
Scout indexing
Searchable models are indexed through Scout, then synced to the search backend through delayed jobs.
Cart and product-entry reuse
The navigation search form and cart add-product flow both reuse the same storefront search action.
Sources:
packages/framework/src/Actions/FastSearch/SearchProducts.phppackages/framework/src/Actions/Product/Requests/Storefront/SearchProducts.phppackages/storefront/src/Livewire/Storefront/Navigation/SearchForm.phppackages/storefront/src/Livewire/Storefront/Cart/Items/AddProductToCart.php
Where It Appears To End Users
FastSearch is mostly invisible as a named feature.
Shoppers see the result through:
- the storefront search page
- the navigation search dropdown
- category, brand, and collection browse pages
- price and facet filters
- location-aware availability and price variation
Current Documentation Takeaways
FastSearchis the storefront query layer, not the search index itself.- Scout handles model indexing, while
FastSearch/SearchProductshandles shopper query behavior. - Province code, stock state, and customer restrictions materially affect what shoppers see.
Open Questions
- This pass did not inspect the host-app Meilisearch configuration or any custom index schema outside the shared package.
Sources
packages/framework/src/Actions/FastSearch/SearchProducts.phppackages/framework/src/Actions/Product/Requests/Storefront/SearchProducts.phppackages/framework/src/Models/Traits/PyleSearchable.phppackages/framework/src/Listeners/SyncSearchable.phppackages/framework/src/Actions/Searchable/SyncModelToSearchable.phppackages/storefront/src/Livewire/Storefront/Search/Page.phppackages/storefront/src/Livewire/Storefront/FastSearch/Wrapper.phppackages/storefront/src/Livewire/Storefront/FastSearch/Hits.phppackages/storefront/src/Livewire/Storefront/FastSearch/SearchBar.phppackages/storefront/src/Livewire/Storefront/Navigation/SearchForm.phppackages/storefront/src/Livewire/Storefront/Cart/Items/AddProductToCart.php