Download the PHP package avadim/manticore-query-builder-laravel without Composer

On this page you can find all versions of the php package avadim/manticore-query-builder-laravel. 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 manticore-query-builder-laravel

Русский

GitHub Release tests

ManticoreSearch Database Driver for Laravel

A native Laravel Database driver for ManticoreSearch. Use Laravel's database manager, Query Builder, collections, pagination, query events and Schema Builder over PDO's MySQL protocol.

Version 4.0.1 is the stable native driver. See the 4.0.1 release notes for changes and limitations. The 3.x wrapper API and its dependency on avadim/manticore-query-builder-php have been removed. Existing applications should follow the 3.x migration guide.

Contents

Requirements

The supported server floor is 28.6.6. CI tests its official image pinned by digest and the moving latest image; see the server compatibility policy. Support for older servers, Lumen and general Eloquent compatibility is not established.

Installation

To install the stable 4.x driver:

To test subsequent development changes:

The migration guide has been exercised on a Laravel 12 application with its original documents preserved. Other applications require their own checks.

Laravel discovers avadim\Manticore\Laravel\ServiceProvider automatically. If package discovery is disabled, register that provider in bootstrap/providers.php. DatabaseServiceProvider remains an alternative registration entry point for applications that used the native driver earlier in 4.x development. Registering either provider is sufficient. There is no ManticoreDb alias or package configuration to publish.

Configuration

Add this entry to connections in config/database.php:

Keep the application's primary database as its default and use DB::connection('manticore') explicitly. Additional connection names can use the same manticore driver with their own settings. The driver reads no config/manticore.php, MANTICORE_CONNECTION, force_prefix or lazy_insert_ids. Laravel always prefixes builder table names; use products, without ?. Raw SQL is not rewritten. PDO emulated prepares must stay enabled.

Use DB::listen() for logging and DB::purge() / DB::reconnect() for worker connections. See the migration guide for logging and schema-cache lifecycle examples.

Queries and results

Query Builder select() returns the builder and configures columns. Connection $db->select($sql, $bindings) executes SQL and returns array<stdClass> without builder casts. get(['id', 'title']) accepts an array; a comma-separated string is not a column list. Rows use object properties. To get arrays, use $rows->map(static fn ($row) => (array)$row)->all().

Use whereFullText() for text input and an explicit field scope. It returns the builder; get(), first() or search() executes the query. Search operators are escaped by default.

Repeated calls produce one MATCH. Text OR groups use orWhereFullText(); OR between text and attributes is unsupported. See full-text examples and options.

JSON filters use Laravel's familiar syntax:

See JSON methods and Manticore-specific semantics.

cursor() returns a LazyCollection from one SELECT. lazy() reads offset pages; lazyById() walks an ID boundary. cursorPaginate() supports selected integer/bool/timestamp keys with ID as the final tie-breaker. Floats, computed keys, KNN and grouped/faceted cursor pagination are rejected. See the full driver reference for exact totals and streaming limits.

Writes and transactions

insert() / replace() return bool, update() / delete() return affected counts, and insertGetId() / replaceGetId() return int|string. Put explicit IDs in the document. SQL failures throw Illuminate\Database\QueryException; zero affected rows can be successful. REPLACE replaces the entire document, resetting omitted attributes, and supports full-text changes. Nested transactions, DDL inside transactions and retry counts other than one are rejected. Writes are never automatically replayed after a lost response.

Search extensions

search() captures rows, metadata and facets before query listeners. get() fetches rows only. Other extensions include option(), knn(), MVA ANY/ALL, geo distance, and connection-level keywords(), suggest(), qsuggest(), snippets(), autocomplete() and generic call(). See the reference for signatures and server requirements.

The hybrid search guide progresses from a minimal call to advanced options. hybridSearch() returns HybridResult, hybridGet() returns Collection<stdClass>, and hybridFirst() returns stdClass|null. These execute immediately; the alpha.2 hybrid(...)->search() call is removed. knn()->match() retains intersection semantics. Capability probes and RT replacement are documented separately; replacement requires maintenance and does not promise zero downtime.

Schema and migrations

CREATE, DROP and ALTER ADD/DROP use Laravel Schema Builder, including multi64(), floatVector() and CREATE setting(). Unsupported schema operations fail explicitly. Extended ALTER supports settings changes/inspection, int-to-bigint change() and table rename() with Buddy. Keep the migration repository in the primary SQL database; select Manticore inside individual migrations. DDL is not transactional. See the migration example.

Differences from Laravel Query Builder

The complete API profile and frozen contracts cover every reviewed public method, explicit rejections, argument defaults, results and exceptions.

The select(), get(), first() and lazy() contracts are preserved: a builder, collection, object/null and lazy collection respectively. The differences below matter when porting queries from Laravel's standard SQL drivers. Standard Query Builder capabilities also depend on the selected database; see Laravel's reference.

Operation Standard Laravel Query Builder This Manticore driver
Substring matching whereLike() or where('name', 'like', '%text%') use SQL LIKE LIKE in WHERE is unsupported. Use match() with full-text index rules for TEXT, or REGEX() through a SELECT alias for STRING. Their search semantics differ
Full-text search whereFullText() with database-specific options whereFullText() / orWhereFullText() compile to one MATCH, escape operators by default and accept only the escape option. Text/attribute OR is unsupported; match() accepts native expressions
JSON predicates details->color syntax and whereJson*() helpers on supported databases Arrow paths and whereJson*() are supported. Contains/overlaps test array elements; key checks treat JSON null as absent. See JSON semantics
Reading JSON Query Builder returns PDO values without automatically decoding JSON into PHP arrays By default, the builder reads DESCRIBE and converts JSON to arrays; cast_attributes => false disables conversion
get() / cursor() without limit() No row-count limit is added to the SQL Manticore defaults to 20 returned rows. Set limit() or use lazy() / chunk() for batched traversal
JOIN, UNION, DISTINCT, WHERE EXISTS, locks Methods expose SQL constructs supported by the selected database The current driver rejects these constructs
Updating text with update() Updates the specified text columns Full-text fields require replace(), which replaces the whole document and resets omitted fields
upsert() Native insert/update by unique keys under the SQL driver's rules Emulated lookup + INSERT/REPLACE; non-updated fields are preserved. Writes share one transaction, but lookups have no isolation and arbitrary lookup attributes have no uniqueness constraint
Writes inside a transaction INSERT, UPDATE and DELETE can be rolled back on transactional SQL tables Manticore transactions cover INSERT/REPLACE/DELETE; UPDATE is not rolled back. Driver nesting, savepoints and retries are rejected
cursorPaginate() Builds cursor boundaries from selected ordering columns under Laravel's constraints Only selected integer/bool/timestamp keys ending in ID are supported; KNN, groups, facets and float/string/JSON/MVA/computed keys are rejected

LIKE alternatives follow Manticore field types and REGEX. See also result limits, transactions and driver restrictions.

Use bound parameters with whereRaw() / selectRaw(); DB::raw() is for trusted SQL. Escape literal MATCH text with avadim\Manticore\Laravel\Database\ManticoreQueryBuilder::escapeMatch(). Build a single MATCH expression per query.

Testing and benchmarks

Integration tests use MANTICORE_TEST_HOST / MANTICORE_TEST_PORT (127.0.0.1:9306). Set MANTICORE_TEST_BUDDY=1 to require AUTOCOMPLETE. Tests skip unavailable server features locally; CI uses --fail-on-skipped. The default bootstrap rejects loading standalone PHP-builder classes. Tests also require pdo_sqlite for the primary migration repository. See verification instructions for isolated production consumers and test matrices.

Benchmarks compare the native driver with PDO and the official HTTP client. Performance covers current bulk-write comparisons and earlier upsert, read, hybrid and worker measurements, with explicit versions and workload limits.


All versions of manticore-query-builder-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
ext-pdo Version *
ext-pdo_mysql Version *
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/pagination Version ^11.0|^12.0|^13.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 avadim/manticore-query-builder-laravel contains the following files

Loading the files please wait ...