Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Site Search Laravel Package

spatie/laravel-site-search

Crawl and index your Laravel site for fast full-text search—like a private Google. Highly customizable crawling and indexing, with concurrent requests. Uses SQLite FTS5 by default (no external services), or Meilisearch for advanced features.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Internal Search Engine: Build a private, fast, and scalable search solution for internal documentation, knowledge bases, or customer portals without relying on third-party APIs (e.g., Algolia, Elasticsearch).
  • SEO & Content Optimization: Enable real-time search analytics to identify gaps in content discoverability, missing keywords, or poorly indexed pages.
  • Customizable Crawling Logic: Implement granular control over what gets indexed (e.g., exclude admin pages, prioritize blog posts) via search profiles and custom indexers.
  • Multi-Tenant or Multi-Site Search: Support search across multiple Laravel applications or domains by leveraging the index_name parameter in queries.
  • Offline-First Search: Use the SQLite/PostgreSQL/MySQL driver for low-latency, offline-capable search without external dependencies (vs. Meilisearch).
  • A/B Testing for Search UX: Experiment with different ranking algorithms (e.g., weighting titles vs. body content) by extending the database driver or swapping to Meilisearch for advanced features like synonyms.
  • Compliance & Data Control: Host search indexes on-premises (via database driver) to avoid cloud vendor lock-in or GDPR concerns.
  • Legacy System Integration: Modernize outdated search functionality in monolithic PHP apps by replacing custom scripts with this package’s structured approach.

When to Consider This Package

  • Avoid if:
    • You need real-time indexing (e.g., e-commerce product search with instant updates). This package crawls asynchronously; consider Meilisearch or Algolia for sub-second indexing.
    • Your site is extremely large (millions of pages). The package uses concurrent crawling but may struggle with deep or dynamic sites (e.g., SPAs). Evaluate Elasticsearch or Typesense instead.
    • You require advanced features like faceted search, synonyms, or custom ranking rules. The database driver lacks these; Meilisearch (optional) or dedicated search engines are better fits.
    • Your stack isn’t Laravel 12+ with PHP 8.4+. Compatibility is strict.
    • You need multi-language search with stemming/tokenization. While SQLite/MySQL/PostgreSQL support basic stemming, specialized tools like Solr or Meilisearch offer better multilingual support.
  • Consider alternatives:
    • For simplicity: Use Laravel’s built-in Scout with a cloud provider (e.g., Algolia) if you don’t need crawling.
    • For scalability: Elasticsearch or OpenSearch for enterprise-grade search with distributed indexing.
    • For developer experience: Typesense or Meilisearch (standalone) if you want a dedicated search API without Laravel integration.

How to Pitch It (Stakeholders)

For Executives:

"We’re replacing our clunky, third-party search solution with a self-hosted, Laravel-native search engine that crawls our entire site—like a private Google for our users. This cuts cloud costs, improves compliance, and lets us control what gets indexed (e.g., prioritizing customer support docs over admin pages). By leveraging Spatie’s open-source package, we avoid vendor lock-in while getting enterprise-grade search for a fraction of the cost. The Meilisearch option even adds advanced features like synonyms if needed. Let’s demo how this boosts content discoverability and reduces support tickets from users struggling to find answers."

For Engineering:

*"This package gives us a batteries-included, Laravel-first search solution with zero external dependencies (default SQLite driver). Key benefits:

  • Customizable crawling: Exclude pages via robots.txt or headers, or build custom profiles to target specific content (e.g., only blog posts).
  • Flexible storage: Use SQLite for simplicity, PostgreSQL/MySQL for scalability, or Meilisearch for advanced features.
  • Debugging tools: The ArrayDriver logs every crawl step, and --sync mode lets us test changes instantly.
  • Performance: Concurrent crawling speeds up indexing, and the database driver avoids API latency. Tradeoffs: No real-time updates (crawling is async), but we can mitigate this with scheduled crawls. For now, this is the fastest path to a robust, maintainable search system—let’s prototype with the default indexer and iterate from there."*

For Design/Product:

*"This unlocks search personalization without heavy dev lift. For example:

  • Highlight missing content: Use search analytics to identify low-traffic pages needing SEO fixes.
  • A/B test rankings: Swap between the database driver (simple) and Meilisearch (advanced) to compare UX.
  • Deep links: The package auto-generates anchor links to sections in results, improving navigation. Ask devs to expose search metrics (e.g., click-through rates) to refine crawls over time."
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codraw/entity-migrator
codraw/doctrine-extra
codraw/aws-tool-kit
codraw/validator
codraw/workflow
codraw/open-api
codraw/cron-job
codraw/process
codraw/log
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony