Download the PHP package jackardios/elastic-query-wizard without Composer
On this page you can find all versions of the php package jackardios/elastic-query-wizard. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jackardios/elastic-query-wizard
More information about jackardios/elastic-query-wizard
Files in jackardios/elastic-query-wizard
Package elastic-query-wizard
Short Description Laravel Elastic Query Wizard
License MIT
Homepage https://github.com/jackardios/elastic-query-wizard
Informations about the package elastic-query-wizard
Elastic Query Wizard
A powerful Laravel package for building Elasticsearch queries with JSON:API style filtering, sorting, and relation loading. Built on top of laravel-query-wizard and es-scout-driver.
Table of Contents
- Features
- Requirements
- Installation
- Quick Start
- Documentation
- Resource Schemas
- Usage Examples
- Elasticsearch Version Compatibility
- License
Features
- Declarative API — define allowed filters, sorts, and includes in one place
- Resource Schemas — centralize query configuration in reusable, context-aware schema classes
- Security — only explicitly allowed parameters are applied to queries
- Full-text Search — match, multi_match, fuzzy and other Elasticsearch query types
- Geo Queries — filter and sort by geographic coordinates
- Flexible Configuration — pass additional parameters to any query
- SearchBuilder DSL Integration — configure
query, bool clauses, aggregations, highlight, suggest, KNN, and more directly on the wizard - Consistent DSL Facades — use
ElasticQueryandElasticAggregationas package-local proxies for fulles-scout-drivercapabilities - Eloquent Integration — load relations and accessors after Elasticsearch query execution
- JSON:API Compatible — standardized query parameter format
Requirements
- PHP 8.1+
- Laravel 10, 11, or 12
- Elasticsearch 8.x or 9.x
- es-scout-driver
- laravel-query-wizard
Installation
Make sure your model uses the Searchable trait from es-scout-driver:
Quick Start
Basic Example
Documentation
Detailed documentation for each section:
| Section | Description |
|---|---|
| Filters | All filter types: term, match, range, geo, fuzzy, and more |
| Sorts | Sorting by fields, geography, and scripts |
| Includes | Loading Eloquent relations after Elasticsearch query |
| Advanced Usage | Resource schemas, custom filters, aggregations, working with SearchBuilder |
| ES Compatibility | Elasticsearch 8.x/9.x differences and migration guide |
Resource Schemas
For larger applications, use Resource Schemas to centralize query configuration in reusable classes:
Using Schemas
See Advanced Usage for full schema documentation including context-aware schemas, wildcard support, and all available methods.
Usage Examples
Advanced SearchBuilder DSL
Geo Filtering
Full-text Search
Date Range Filtering
Autocomplete Search (Prefix)
Typo-tolerant Search (Fuzzy)
Field Selection
By default,
resourceis the model class basename in camelCase (forPostit ispost). If you useforSchema(), it uses schematype().
Using Aliases
Aliases allow you to use different parameter names in your API:
Default Sorting
Working with Soft Deletes
Filter Groups
Filter groups allow you to create complex query structures with OR/AND logic or query nested documents.
Bool Group (OR Logic)
Nested Group (Nested Documents)
See Filter Groups for more options including innerHits, nested groups, and complex boolean logic.
Query Parameter Format
The package uses a standardized JSON:API style parameter format:
| Parameter | Format | Example |
|---|---|---|
| Filters | filter[field]=value |
?filter[status]=active |
| Sorting | sort=field or sort=-field |
?sort=-created_at |
| Includes | include=relation1,relation2 |
?include=author,comments |
| Fields | fields[resource]=field1,field2 |
?fields[post]=id,title |
| Appends | append=accessor1,accessor2 |
?append=full_name |
Elasticsearch Version Compatibility
This package supports both Elasticsearch 8.x and 9.x. The package handles most version differences internally, but there are some ES 9.x breaking changes to be aware of:
| Feature | ES 9.x Status |
|---|---|
force_source highlighting |
Removed |
| Boolean histogram aggregation | Removed (use terms) |
random_score default field |
Changed to _seq_no |
For full details, migration guide, and safe usage examples, see Elasticsearch Compatibility.
Testing
License
MIT License. See LICENSE file for details.
All versions of elastic-query-wizard with dependencies
jackardios/elastic-scout-driver-plus Version ^v4.0.0
jackardios/laravel-query-wizard Version ^v2.0.2
laravel/framework Version ^v10.0