Download the PHP package jarir-ahmed/search without Composer

On this page you can find all versions of the php package jarir-ahmed/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

search

CI

A unified, framework-agnostic search abstraction for PHP. Write your queries once and run them against Elasticsearch / OpenSearch in production or a dependency-free in-memory engine for tests and small datasets — same API, same results shape.

Features

Backends

Engine Class Notes
In-memory Engines\InMemoryEngine Tokenized scoring, fuzzy (Levenshtein), substring, filters. No deps.
Elasticsearch / OpenSearch Engines\ElasticsearchEngine Query DSL via transport.
Solr Engines\SolrEngine JSON Request API + edismax.
Algolia Engines\AlgoliaEngine Transport carries app-id / API-key headers.
Meilisearch Engines\MeilisearchEngine Bearer-token transport.
Typesense Engines\TypesenseEngine Needs query_by fields.
Database (PDO) Engines\DatabaseEngine Portable LIKE-based FTS, self-creates its table.
Vector / semantic Engines\VectorEngine Cosine similarity over caller-supplied embeddings.

Per-engine setup (transports, credentials, index configuration) is documented in docs/engines.md.

Requirements

Install

Quick start (in-memory)

Elasticsearch / OpenSearch

The engine talks to ES through a TransportInterface. Swap in your own (Guzzle, PSR-18, a mock) by implementing request(string $method, string $path, ?array $body): array.

Note: term filters and sort assume the field is keyword/numeric in your ES mapping.

Solr, Algolia, Meilisearch and Typesense work the same way — construct the engine with a transport and an index/collection name. Configure service auth on the transport, e.g.:

Database engine (no search server)

Semantic / vector search

Supply embeddings from any model; ranking is by cosine similarity — no external service.

Query reference

Method Description
Query::create($term) New query for a search string (empty = match all).
->fields(['title' => 2.0, 'body']) Restrict + boost searched fields.
->filter($field, $value) Exact filter (ANDed). Matches array membership too.
->fuzziness($n) Max edit distance for approximate matches.
->sortBy($field, 'asc'|'desc') Sort by a field instead of relevance.
->from($n) / ->size($n) Pagination.

search() returns a SearchResult (iterable, countable): hits(), ids(), documents(), total(), isEmpty(). Each Hit has id, score, source.

Testing

The suite covers the in-memory engine end-to-end and the Elasticsearch engine via a fake transport (no server required).

License

MIT


All versions of search with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-json Version *
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 jarir-ahmed/search contains the following files

Loading the files please wait ...