Download the PHP package opsource/queryadapter without Composer
On this page you can find all versions of the php package opsource/queryadapter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download opsource/queryadapter
More information about opsource/queryadapter
Files in opsource/queryadapter
Package queryadapter
Short Description Revolutionize your Laravel query management with Laravel Query Adapter! Our adapter package includes multiple query executioners, including Elasticsearch and Eloquent, to help you efficiently run your Laravel queries. Say goodbye to query management headaches and hello to seamless query execution with Laravel Query Adapter. ies.
License MIT
Homepage https://github.com/vahidaghazadeh/queryadapter
Informations about the package queryadapter
Here’s an optimized version of your document:
QueryAdapter
QueryAdapter is a powerful Laravel package that provides an intuitive abstraction layer for interacting with Elasticsearch indices. It includes a set of query builders designed for searching, aggregating, and suggesting data, while offering essential utilities for efficient index management. This package enables developers to work with Elasticsearch in a structured and efficient way, eliminating the complexity of low-level queries.
Installation
To get started, install the package via Composer:
Usage
Setting Up
Before using the QueryAdapter package, ensure that your Elasticsearch client is properly configured. The package relies on ElasticClient
to manage all Elasticsearch communications, ensuring smooth data indexing and retrieval.
Interacting with Indices
The InteractsWithIndex
trait offers powerful methods to manage and query Elasticsearch indices efficiently.
Bulk Insert
Insert multiple documents into an Elasticsearch index in a single operation for improved performance:
Fetch Index Information
Retrieve detailed information about a specific index, including settings and mappings:
Delete an Index
Remove an index when it is no longer needed:
Create a New Index with Custom Settings
Define and create a new Elasticsearch index with custom settings:
Refresh an Index
Make recent operations visible to search queries:
Querying Data
QueryAdapter simplifies querying with its builder-based approach.
Search Query
Perform a basic search query:
Index Class Example
Create an index class similar to an Eloquent model:
Set a unique document attribute name for $indicator
, which is used as an additional sort in search_after
.
Query Example
Perform a search with complex filters and sorting:
Filtering
Nested Queries
nested_field
must have nested
type. Subqueries can only use subdocument fields.
Full-Text Search
Sorting
Use dedicated sort methods for each sort type:
Pagination
Offset Pagination
Cursor Pagination
Aggregation
Create aggregation queries:
Aggregate Types
Suggesting
Create suggest queries for autocomplete or typo correction:
Suggester Types
Term Suggester:
Phrase Suggester:
CLI Commands
engine:make
Generates various engine components:
engine:make-facade
Generates a facade for a search engine model.
engine:make-directive
Creates a directive class for a search engine model.
Query Log
Enable query logging to track executed queries:
Environment Variables
Configure the following environment variables:
Elasticsearch Version Compatibility
Separate releases are created for Elasticsearch 7 and 8. Development for each version occurs in corresponding branches.
Contributing
See CONTRIBUTING for details.
License
MIT License. See LICENSE.md for more information.
This version improves readability and structure while maintaining clarity. It consolidates sections, removes redundancy, and ensures consistency throughout the document.
All versions of queryadapter with dependencies
laravel/framework Version >=v10.48
elasticsearch/elasticsearch Version >=v8.1.0
opsource/rabbitmq Version >=v1.0.3
symfony/http-client Version ^7.0
symfony/psr-http-message-bridge Version ^7.0