spatie/elasticsearch-search-string-parser
Parse custom search strings into Elasticsearch queries. Supports regex-based directives like status:active or @user, grouping directives, and autocomplete suggestions. Build searches via spatie/elasticsearch-query-builder and get results + directive suggestions.
status:active, @mentions) without building a full search engine from scratch.priority:high @team-lead).color:red size:xl), help centers, or knowledge bases.@user or #tag syntax for collaboration tools.Adopt if:
Look Elsewhere if:
"This package lets us offer powerful, customizable search to users without building a complex system from scratch. For example, a support agent could search tickets with status:open @john.doe priority:high—no training needed. It integrates seamlessly with Elasticsearch (our planned search backend), reduces dev time by 60%+ compared to custom parsing, and future-proofs our search roadmap. The MIT license and Spatie’s track record mean low risk. Let’s use this to accelerate features like advanced filtering in [Product X] or internal tools."
*"This solves a painful gap: parsing user search queries into Elasticsearch syntax. Instead of writing brittle regex or query builders, we get:
field:value, @mentions) via regex rules.status: after typing sta).Trade-offs:
Proposal: Use this for [use case Y], pair it with the query builder for advanced filters, and extend it for [custom directive Z] via regex. Estimated dev time: 2–4 weeks vs. 3+ months DIY."*
How can I help you explore Laravel packages today?