PHPackages                             manticoresoftware/manticoresearch-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. manticoresoftware/manticoresearch-php

ActiveLibrary[Search &amp; Filtering](/categories/search)

manticoresoftware/manticoresearch-php
=====================================

PHP Client for Manticore Search

4.0.1(1y ago)206550.0k—3.8%37[18 issues](https://github.com/manticoresoftware/manticoresearch-php/issues)[2 PRs](https://github.com/manticoresoftware/manticoresearch-php/pulls)15MITPHPPHP ^7.4|^8.0CI passing

Since Mar 16Pushed 2mo ago13 watchersCompare

[ Source](https://github.com/manticoresoftware/manticoresearch-php)[ Packagist](https://packagist.org/packages/manticoresoftware/manticoresearch-php)[ RSS](/packages/manticoresoftware-manticoresearch-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (41)Used By (15)

manticoresearch-php
===================

[](#manticoresearch-php)

[![Build Status](https://github.com/manticoresoftware/manticoresearch-php/actions/workflows/ci.yml/badge.svg)](https://github.com/manticoresoftware/manticoresearch-php/actions/workflows/ci.yml/badge.svg)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/1f6436fc6e3846d5f089f6da9f2e849ea73095b6e64ea1aac8916c67f2c76f89/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d616e7469636f7265736f6674776172652f6d616e7469636f72657365617263682d7068702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/manticoresoftware/manticoresearch-php/?branch=master)[![codecov.io](https://camo.githubusercontent.com/87060088ee7d3086aa1b0c13c39a2e546403e260bc692e32ec27ad7848c82090/68747470733a2f2f636f6465636f762e696f2f6769746875622f6d616e7469636f7265736f6674776172652f6d616e7469636f72657365617263682d7068702f636f7665726167652e737667)](https://codecov.io/github/manticoresoftware/manticoresearch-php)[![Latest Stable Version](https://camo.githubusercontent.com/8ab23812f38f3b7dd6bab37c52e1fcff8df82d3c6e0f8e4fbe562e519ec1908a/68747470733a2f2f706f7365722e707567782e6f72672f6d616e7469636f7265736f6674776172652f6d616e7469636f72657365617263682d7068702f762f737461626c65)](https://packagist.org/packages/manticoresoftware/manticoresearch-php)[![License](https://camo.githubusercontent.com/48c1b1e76fc40eaedf06133069430e9f2b9bc4dd882a42cface389e7e24340e3/68747470733a2f2f706f7365722e707567782e6f72672f6d616e7469636f7265736f6674776172652f6d616e7469636f72657365617263682d7068702f6c6963656e7365)](https://packagist.org/packages/manticoresoftware/manticoresearch-php)[![Slack](https://camo.githubusercontent.com/ada84ec29d41b684d67ac249a3b1ac0160ceff4e8d0b5daba74a1635f7ac5e87/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f536c61636b2d6a6f696e253230636861742d677265656e2e737667)](https://slack.manticoresearch.com/)

[![Total Downloads](https://camo.githubusercontent.com/0992419c5557d5b673b2d995489c318a9a7e1084705c4fa72f87c3d0e020dc99/68747470733a2f2f706f7365722e707567782e6f72672f6d616e7469636f7265736f6674776172652f6d616e7469636f72657365617263682d7068702f646f776e6c6f616473)](https://packagist.org/packages/manticoresoftware/manticoresearch-php)[![Monthly Downloads](https://camo.githubusercontent.com/d6e3f43cea835181bb6e39ee014ba06432bb7642d9282e5f3c5ac0f2ff7c0d20/68747470733a2f2f706f7365722e707567782e6f72672f6d616e7469636f7265736f6674776172652f6d616e7469636f72657365617263682d7068702f642f6d6f6e74686c79)](https://packagist.org/packages/manticoresoftware/manticoresearch-php)[![Daily Downloads](https://camo.githubusercontent.com/66aec0637ca6f57cce016ee765ee45f87365942d9311cee9114deb8bf6f6b32b/68747470733a2f2f706f7365722e707567782e6f72672f6d616e7469636f7265736f6674776172652f6d616e7469636f72657365617263682d7068702f642f6461696c79)](https://packagist.org/packages/manticoresoftware/manticoresearch-php)[![composer.lock](https://camo.githubusercontent.com/5b98d20be25365e9e76dda232245dca71157ddcc137c14d72069b63d73cb8415/68747470733a2f2f706f7365722e707567782e6f72672f6d616e7469636f7265736f6674776172652f6d616e7469636f72657365617263682d7068702f636f6d706f7365726c6f636b)](https://packagist.org/packages/manticoresoftware/manticoresearch-php)

[![GitHub Code Size](https://camo.githubusercontent.com/0d0ecba468c0b2b680b6944432b29aa14ccd50f71720a565fb766b4abee0c0aa/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f6d616e7469636f7265736f6674776172652f6d616e7469636f72657365617263682d706870)](https://github.com/manticoresoftware/manticoresearch-php)[![GitHub Repo Size](https://camo.githubusercontent.com/c8e570a4b873e9cef3fb17cdae0a646ccc1f9875718ab6c7954b146e779ca88e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f6d616e7469636f7265736f6674776172652f6d616e7469636f72657365617263682d706870)](https://github.com/manticoresoftware/manticoresearch-php)[![GitHub Last Commit](https://camo.githubusercontent.com/6a6312dc7093a109094f4f78b97292490923f0706ed8357d7ec77373c251fd12/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f6d616e7469636f7265736f6674776172652f6d616e7469636f72657365617263682d706870)](https://github.com/manticoresoftware/manticoresearch-php)[![GitHub Activity](https://camo.githubusercontent.com/931033984eb916698bb37e5b186b2ec0568fcb1bface7ccf9e44033bd3b6eb70/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6d6d69742d61637469766974792f6d2f6d616e7469636f7265736f6674776172652f6d616e7469636f72657365617263682d706870)](https://github.com/manticoresoftware/manticoresearch-php)[![GitHub Issues](https://camo.githubusercontent.com/346e15cad92353eb264d2bc3802b09f1bed41470c392751bccd8a8434fba79d7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6d616e7469636f7265736f6674776172652f6d616e7469636f72657365617263682d706870)](https://github.com/manticoresoftware/manticoresearch-php/issues)

Official PHP client for Manticore Search.

❗ WARNING: this is a development version of the client. The latest release's readme is

Features
--------

[](#features)

- One to one mapping with the HTTP API
- connection pools with pluggable selection strategy. Defaults to static round robin
- pluggable PSR/Log interface
- pluggable transport protocols.
- persistent connections

Requirements
------------

[](#requirements)

Requires PHP 7.1 or greater with the native JSON extension. Default transport handler uses the cURL extension.

Minimum Manticore Search version is 2.5.1 with HTTP protocol enabled.

Manticore Searchmanticoresearch-phpPHP&gt;= 7.0.04.0.x&gt;= 7.4, &gt;=8.0&gt;= 6.3.63.2.x&gt;= 7.4, &gt;=8.0&gt;= 6.2.03.1.x&gt;= 7.4, &gt;=8.0&gt;= 6.2.03.0.x&gt;= 7.4, &gt;=8.0&gt;= 6.0.43.0.x&gt;= 7.1, &gt;=8.0&gt;= 4.2.12.0.x, 2.1.x, 2.2.x&gt;= 7.1, &gt;=8.0&gt;= 4.0.21.7.x, 1.8.x&gt;= 7.1, &gt;=8.0&gt;= 3.5.21.6.x&gt;= 7.1, &gt;=8.0&gt;= 3.5.01.5.x&gt;= 7.1, &lt;8.0&gt;= 3.5.01.4&gt;= 7.1, &lt;8.0&lt;= 3.4.x1.3&gt;= 7.1, &lt;8.0&gt;= 2.5.1, &lt;3.4.01.2&gt;= 7.1, &lt;8.0Documentation
-------------

[](#documentation)

Full documentation is available in [docs](docs) folder.

Manticore Search server documentation: .

Getting Started
---------------

[](#getting-started)

Install the Manticore Search PHP client using [composer](https://getcomposer.org) package manager:

```
composer require manticoresoftware/manticoresearch-php:dev-master
```

### Initiate a table:

[](#initiate-a-table)

```
require_once __DIR__ . '/vendor/autoload.php';

$config = ['host'=>'127.0.0.1','port'=>9308];
$client = new \Manticoresearch\Client($config);
$table = $client->table('movies');
```

### Create the table:

[](#create-the-table)

```
$table->create([
    'title'=>['type'=>'text'],
    'plot'=>['type'=>'text'],
    '_year'=>['type'=>'integer'],
    'rating'=>['type'=>'float']
    ]);
```

### Add a document:

[](#add-a-document)

```
$table->addDocument([
        'title' => 'Star Trek: Nemesis',
        'plot' => 'The Enterprise is diverted to the Romulan homeworld Romulus, supposedly because they want to negotiate a peace treaty. Captain Picard and his crew discover a serious threat to the Federation once Praetor Shinzon plans to attack Earth.',
        '_year' => 2002,
        'rating' => 6.4
        ],
    1);
```

### Add several documents at once:

[](#add-several-documents-at-once)

```
$table->addDocuments([
        ['id'=>2,'title'=>'Interstellar','plot'=>'A team of explorers travel through a wormhole in space in an attempt to ensure humanity\'s survival.','_year'=>2014,'rating'=>8.5],
        ['id'=>3,'title'=>'Inception','plot'=>'A thief who steals corporate secrets through the use of dream-sharing technology is given the inverse task of planting an idea into the mind of a C.E.O.','_year'=>2010,'rating'=>8.8],
        ['id'=>4,'title'=>'1917 ','plot'=>' As a regiment assembles to wage war deep in enemy territory, two soldiers are assigned to race against time and deliver a message that will stop 1,600 men from walking straight into a deadly trap.','_year'=>2018,'rating'=>8.4],
        ['id'=>5,'title'=>'Alien','plot'=>' After a space merchant vessel receives an unknown transmission as a distress call, one of the team\'s member is attacked by a mysterious life form and they soon realize that its life cycle has merely begun.','_year'=>1979,'rating'=>8.4]
    ]);
```

### Perform a search:

[](#perform-a-search)

```
$results = $table->search('space team')->get();

foreach($results as $doc) {
   echo 'Document:'.$doc->getId()."\n";
   foreach($doc->getData() as $field=>$value)
   {
        echo $field.": ".$value."\n";
   }
}
```

Result:

```
Document:2
year: 2014
rating: 8.5
title: Interstellar
plot: A team of explorers travel through a wormhole in space in an attempt to ensure humanity's survival.

```

A text search with attribute filters:

```
$results = $table->search('space team')
                 ->filter('_year','gte',2000)
                 ->filter('rating','gte',8.0)
                 ->sort('_year','desc')
                 ->get();

foreach($results as $doc) {
    echo 'Document:'.$doc->getId()."\n";
    foreach($doc->getData() as $field=>$value)
    {
        echo $field.": ".$value."\n";
    }
}
```

### Update documents:

[](#update-documents)

By document id:

```
$table->updateDocument(['_year'=>2019],4);
```

By query:

```
$table->updateDocument(['_year'=>2019],['match'=>['*'=>'team']]);
```

### Get table schema:

[](#get-table-schema)

```
$table->describe();
```

### Drop table:

[](#drop-table)

```
$table->drop();
```

The above will fail if the table does not exist. To get around this pass a parameter of true, which cause the failure to be silent.

```
$table->drop(true);
```

License
-------

[](#license)

Manticore Search PHP Client is an open-source software licensed under the [MIT license](LICENSE.txt)

###  Health Score

61

—

FairBetter than 99% of packages

Maintenance67

Regular maintenance activity

Popularity56

Moderate usage in the ecosystem

Community38

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~59 days

Recently: every ~67 days

Total

34

Last Release

297d ago

Major Versions

1.8.0 → 2.0.02022-05-18

v2.3.1 → v3.0.02023-03-10

2.3.1.x-dev → 3.0.0.x-dev2023-03-15

3.2.0 → 4.0.02025-02-20

PHP version history (4 changes)1.0PHP ^7.0

1.1PHP ^7.1

1.6.0PHP &gt;=7.1

3.2.0.x-devPHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/cc3626cbbf987143c0a01702d0b88055c422787257d24e4d606d933f9d855711?d=identicon)[adriannuta](/maintainers/adriannuta)

![](https://avatars.githubusercontent.com/u/28718748?v=4)[Manticore Search](/maintainers/manticoresearch)[@manticoresearch](https://github.com/manticoresearch)

---

Top Contributors

[![adriannuta](https://avatars.githubusercontent.com/u/956984?v=4)](https://github.com/adriannuta "adriannuta (144 commits)")[![Nick-S-2018](https://avatars.githubusercontent.com/u/45552280?v=4)](https://github.com/Nick-S-2018 "Nick-S-2018 (113 commits)")[![sanikolaev](https://avatars.githubusercontent.com/u/28719845?v=4)](https://github.com/sanikolaev "sanikolaev (33 commits)")[![gordonbanderson](https://avatars.githubusercontent.com/u/7060?v=4)](https://github.com/gordonbanderson "gordonbanderson (19 commits)")[![aivchen](https://avatars.githubusercontent.com/u/4580308?v=4)](https://github.com/aivchen "aivchen (17 commits)")[![manticoresearch](https://avatars.githubusercontent.com/u/28718748?v=4)](https://github.com/manticoresearch "manticoresearch (9 commits)")[![donhardman](https://avatars.githubusercontent.com/u/59067742?v=4)](https://github.com/donhardman "donhardman (8 commits)")[![markomilivojevic](https://avatars.githubusercontent.com/u/22796935?v=4)](https://github.com/markomilivojevic "markomilivojevic (6 commits)")[![acya-skulskaya](https://avatars.githubusercontent.com/u/426505?v=4)](https://github.com/acya-skulskaya "acya-skulskaya (3 commits)")[![nurieff](https://avatars.githubusercontent.com/u/3961418?v=4)](https://github.com/nurieff "nurieff (2 commits)")[![hlushpenko](https://avatars.githubusercontent.com/u/24788599?v=4)](https://github.com/hlushpenko "hlushpenko (1 commits)")[![EvilFreelancer](https://avatars.githubusercontent.com/u/9089568?v=4)](https://github.com/EvilFreelancer "EvilFreelancer (1 commits)")[![marios88](https://avatars.githubusercontent.com/u/302688?v=4)](https://github.com/marios88 "marios88 (1 commits)")[![DimmmCom](https://avatars.githubusercontent.com/u/10045747?v=4)](https://github.com/DimmmCom "DimmmCom (1 commits)")[![AnTheMaker](https://avatars.githubusercontent.com/u/18481195?v=4)](https://github.com/AnTheMaker "AnTheMaker (1 commits)")[![p-golovin](https://avatars.githubusercontent.com/u/7702213?v=4)](https://github.com/p-golovin "p-golovin (1 commits)")[![airolg](https://avatars.githubusercontent.com/u/29430349?v=4)](https://github.com/airolg "airolg (1 commits)")[![GeaTech](https://avatars.githubusercontent.com/u/11393971?v=4)](https://github.com/GeaTech "GeaTech (1 commits)")[![tinigin](https://avatars.githubusercontent.com/u/927083?v=4)](https://github.com/tinigin "tinigin (1 commits)")

---

Tags

phpsearchclientsearchmanticoresearch

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/manticoresoftware-manticoresearch-php/health.svg)

```
[![Health](https://phpackages.com/badges/manticoresoftware-manticoresearch-php/health.svg)](https://phpackages.com/packages/manticoresoftware-manticoresearch-php)
```

###  Alternatives

[elasticsearch/elasticsearch

PHP Client for Elasticsearch

5.3k178.3M943](/packages/elasticsearch-elasticsearch)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15224.3M65](/packages/opensearch-project-opensearch-php)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
