Weave 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

Fuse Laravel Package

loilo/fuse

Fuse.php brings Fuse.js-style fuzzy search to PHP and Laravel. Add fast, typo-tolerant full-text search to arrays, collections, and Eloquent models, complete with weighted keys, relevance scoring, and bitap matching—no external search engine or server required.

Deep Wiki
Context7

Product Decisions This Supports

  • Search UX investment sizing — Answers "can we ship typo-tolerant search this sprint?" for internal tools and mid-size datasets without a search-infrastructure workstream. loilo/fuse is a PHP port of Fuse.js, so the ranking model (bitap-style fuzzy matching, weighted keys, configurable threshold/distance) is proven and predictable; the PM decision is scoped to "is client-side-style fuzzy matching enough?" rather than "which search platform do we buy?"
  • Build vs. buy — A concrete $0/licence-free option against Algolia, Typesense Cloud, or Meilisearch hosting. Apache-2.0 means no legal friction for commercial embedding. The real comparison is not "OSS vs. vendor" but "in-memory fuzzy matching vs. a persistent index service" — different operational commitments, not just different price tags.
  • Roadmap sequencing — Fits well as a de-risking stopgap: ship the search affordance now, instrument it, and let usage data decide whether a dedicated search service earns a place on next quarter's roadmap. This converts a speculative infrastructure bet into an evidence-driven one.
  • Feature candidates it unlocks cheaply — Admin/back-office record lookup ("find the customer, I have a partial name"), SKU and catalog pickers, help-centre and internal-docs search, CLI/artisan tooling search, ticket and log grepping, config-key discovery, and autocomplete over reference lists. All of these degrade badly with LIKE %term% and improve dramatically with fuzzy scoring.
  • Explicit non-goals — Because search lives in PHP process memory, this decision also rules out faceted navigation over large corpora, permission-aware filtering at scale, and relevance tuning driven by click analytics. Naming those exclusions up front prevents scope creep swallowing the cheap win.
  • Migration trigger definition — Adopting it is an opportunity to write down the numbers that force a re-evaluation (record count, p95 latency, peak memory, index freshness requirement). That artefact is more valuable than the library itself.

When to Consider This Package

Adopt when:

  • The searchable corpus is small-to-moderate (rule of thumb: tens of thousands of records, not millions) and can be loaded or pre-filtered per request without bloating memory.
  • Requirements are typo tolerance, partial matching, weighted multi-field ranking, and "did you mean"-style results — not semantic/vector search, stemming per locale, or synonym dictionaries.
  • The stack is plain PHP/Laravel and the team values not operating another service. No daemon, no index pipeline, no sync jobs, no new on-call surface.
  • You want Fuse.js-identical behaviour across a JS frontend and a PHP backend, so client-side and server-side results agree.
  • Search is a supporting affordance, not the product.

Look elsewhere when:

  • Dataset growth is the plan, not the exception. In-memory scoring in PHP will hit CPU/memory ceilings well before a dedicated engine does; benchmark with realistic records before committing, because PHP throughput here is materially below the JavaScript or Rust implementations.
  • You need persistent indexes, incremental reindexing, high-cardinality facets, or per-user access-control filtering enforced inside the search layer.
  • Multilingual analysis (stemming, CJK segmentation, accent folding at scale) is a real requirement — that is an analyzer problem this library does not solve.
  • Maintenance risk is unacceptable. This is the sharpest caveat: last release October 2023, ~366 GitHub stars, and a port that tracks upstream Fuse.js by hand. Verify open-issue responsiveness, PHP 8.3/8.4 compatibility, and whether it is a single-maintainer project. For anything customer-facing and load-bearing, plan to pin the version, vendor the source, or be prepared to fork.
  • Consider the boring alternatives first: Postgres full-text search with pg_trgm costs nothing new operationally and handles more data than people expect; Laravel Scout with a TNTSearch driver or Meilisearch is the natural upgrade path once fuzzy-in-PHP stops being enough. Note that this package ships no Laravel service provider — it is a plain library, so you own the integration glue either way.

How to Pitch It (Stakeholders)

For executives: We can add typo-tolerant, ranked search to [surface] in days rather than a quarter, at zero licence cost and with no new infrastructure to run or secure. It is reversible by design — we will hide it behind a single internal interface, so if usage justifies a paid search platform later, swapping it is a contained change, not a rewrite. The trade-off is honest: this is a small open-source project last released in 2023, so we pin the version, add it to our dependency-review list, and treat it as a deliberate stopgap with a documented exit trigger rather than a decade-long platform bet. Cheapest possible way to buy real usage data before spending real money.

For engineering: composer require loilo/fuse, no service provider, no new runtime dependency beyond PHP itself — no daemon, no ports, no index sync, no secrets. Behaviour matches Fuse.js, so frontend and backend ranking stay consistent, and it is pure in-process logic, which means unit-testable, deterministic, and trivially debuggable. We wrap it in a SearchService contract with an array-backed implementation first, so a Meilisearch/Scout implementation can slot in behind the same interface when the numbers demand it. Ask: benchmark at 2–3× current record count and record p95 latency and peak memory, and confirm PHP version support against the 2023 release before we commit.

For support and operations: Fewer "I can't find the record, can you look it up?" escalations — partial and misspelled queries return ranked results instead of empty states. No new service to monitor, page on, or patch at the infrastructure layer; the only operational surface is our own application.

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.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle