Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xp-forge/meilisearch
MeiliSearch client
https://github.com/xp-forge/meilisearch
meilisearch php7 php8 xp-framework
Last synced: 29 days ago
JSON representation
MeiliSearch client
- Host: GitHub
- URL: https://github.com/xp-forge/meilisearch
- Owner: xp-forge
- Created: 2021-06-08T20:40:34.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-24T12:30:22.000Z (10 months ago)
- Last Synced: 2024-11-13T21:47:59.559Z (2 months ago)
- Topics: meilisearch, php7, php8, xp-framework
- Language: PHP
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
Awesome Lists containing this project
README
MeiliSearch
===========[![Build status on GitHub](https://github.com/xp-forge/meilisearch/workflows/Tests/badge.svg)](https://github.com/xp-forge/meilisearch/actions)
[![XP Framework Module](https://raw.githubusercontent.com/xp-framework/web/master/static/xp-framework-badge.png)](https://github.com/xp-framework/core)
[![BSD Licence](https://raw.githubusercontent.com/xp-framework/web/master/static/licence-bsd.png)](https://github.com/xp-framework/core/blob/master/LICENCE.md)
[![Requires PHP 7.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-7_0plus.svg)](http://php.net/)
[![Supports PHP 8.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-8_0plus.svg)](http://php.net/)
[![Latest Stable Version](https://poser.pugx.org/xp-forge/meilisearch/version.png)](https://packagist.org/packages/xp-forge/meilisearch)Client library for [MeiliSearch](https://www.meilisearch.com/).
Example
-------
```php
use com\meilisearch\MeiliSearch;
use util\cmd\Console;$search= new MeiliSearch('http://localhost:7700');
// Search the "content" index for the given term
$result= $search->locate('content')->search($term);// Output results
Console::writeLine('%d hits for "%s" in %.3f seconds', $result->hits(), $term, $result->elapsedTime());
foreach ($result as $document) {
Console::writeLine('- ', $document);
}
```