Download the PHP package ez-php/search without Composer

On this page you can find all versions of the php package ez-php/search. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package search

ez-php/search

Full-text search module for ez-php. Provides a driver-based search abstraction with support for Meilisearch, Elasticsearch, and Typesense, event-driven index synchronisation via ez-php/events, and an in-memory NullDriver for testing.

Installation

Requirements

Configuration

Add config/search.php to your application:

Register the provider in provider/modules.php:

Making Entities Searchable

Implement SearchableInterface and use the Searchable trait:

Basic Usage

Automatic Index Synchronisation via Events

Wire SyncSearchIndex to your ORM model events in a service provider's boot():

ORM events must implement HasSearchableModel:

Rebuilding an index (search:import / search:flush)

After a mapping change or on a fresh deploy, re-import documents from the console. The module does not know where your entities live, so register a source — a closure yielding SearchableInterface instances — in one of your providers:

Each document goes through SearchIndex::add(), so DocumentIndexed fires as on a normal save. Use a generator for large tables to keep memory flat.

Events

Event Fired when
DocumentIndexed A document was added or replaced
DocumentRemoved A document was removed

Drivers

Driver Class Notes
null NullDriver In-memory, for tests and local development — no external service; all-terms substring match, simple field = value / != filters joined by AND, field:asc\|desc sort; not relevance-ranked
meilisearch MeilisearchDriver Meilisearch v1.x REST API
elasticsearch ElasticsearchDriver Elasticsearch 8.x / OpenSearch REST API
typesense TypesenseDriver Typesense REST API; auto-creates collections with wildcard schema
database DatabaseDriver The application database — MySQL FULLTEXT (MATCH … AGAINST, boolean mode) or SQLite FTS5; table search.database.table (default search_documents) auto-created; every term required as a prefix, relevance-ordered; filters/sort on stored attributes evaluated in PHP (NullDriver syntax) — for small indexes, no typo tolerance or facets

Docker


All versions of search with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
ext-curl Version *
ez-php/contracts Version ^2.7.0
ez-php/events Version ^2.7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ez-php/search contains the following files

Loading the files please wait ...