{"id":19319240,"url":"https://github.com/oramasearch/oramacloud-client-php","last_synced_at":"2026-01-08T06:05:33.968Z","repository":{"id":249279510,"uuid":"823323599","full_name":"oramasearch/oramacloud-client-php","owner":"oramasearch","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-07T12:11:31.000Z","size":87,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T15:06:24.343Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oramasearch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-02T20:20:39.000Z","updated_at":"2024-10-19T05:14:28.000Z","dependencies_parsed_at":"2024-10-18T18:11:27.835Z","dependency_job_id":"67d9d09f-daa5-4ecf-bdc2-10e89e747177","html_url":"https://github.com/oramasearch/oramacloud-client-php","commit_stats":null,"previous_names":["askorama/oramacloud-client-php","oramasearch/oramacloud-client-php"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oramasearch%2Foramacloud-client-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oramasearch%2Foramacloud-client-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oramasearch%2Foramacloud-client-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oramasearch%2Foramacloud-client-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oramasearch","download_url":"https://codeload.github.com/oramasearch/oramacloud-client-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246254100,"owners_count":20747948,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T01:22:49.022Z","updated_at":"2026-01-08T06:05:33.907Z","avatar_url":"https://github.com/oramasearch.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OramaCloud Client PHP\n\n[![Package Version](https://img.shields.io/packagist/v/oramacloud/client)](https://packagist.org/packages/oramacloud/client)\n[![PHP Version](https://img.shields.io/packagist/php-v/oramacloud/client)](https://packagist.org/packages/oramacloud/client)\n[![Tests](https://github.com/askorama/oramacloud-client-php/actions/workflows/tests.yml/badge.svg)](https://github.com/askorama/oramacloud-client-php/actions/workflows/tests.yml)\n\nWith the OramaCloud PHP Client SDK, you can [perform search queries](https://docs.orama.com/cloud/performing-search/full-text-search) on your [Orama index](https://cloud.orama.com), or programmatically update your index data and trigger new deployments. Integrate Orama Cloud in your PHP application using the [REST APIs](https://docs.orama.com/cloud/data-sources/custom-integrations/rest-apis) to insert and upsert your index data and trigger deployments when it's convinient for your use case. \n\n## Install\n\n```sh\ncomposer require oramacloud/client\n```\n\n#### Compatibility\n\nPHP: 7.3 or later\n\n## Integrating with Orama Cloud\n\n```php\nuse OramaCloud\\Client;\nuse OramaCloud\\Client\\Query;\n\n$client = new Client([\n    'api_key' =\u003e '\u003cYour Orama Cloud API Key\u003e',\n    'endpoint' =\u003e '\u003cYour Orama Cloud Endpoint\u003e'\n]);\n\n$query = (new Query('red shoes'))\n    -\u003ewhere('price', 'gt', 99.99);\n\n$results = $client-\u003esearch($query);\n```\n\n## Advanced search\n\n```php\nuse OramaCloud\\Client;\nuse OramaCloud\\Client\\Query;\nuse OramaCloud\\Client\\QueryParams/WhereOperator;\nuse OramaCloud\\Client\\QueryParams/SortByOrder;\n\n$client = new Client([\n    'api_key' =\u003e '\u003cYour Orama Cloud API Key\u003e',\n    'endpoint' =\u003e '\u003cYour Orama Cloud Endpoint\u003e'\n]);\n\n$query = new Query();\n$query-\u003eterm('red shoes')\n      -\u003emode('hybrid')\n      -\u003ewhere('price', WhereOperator::LTE, 9.99)\n      -\u003ewhere('gender', WhereOperator::EQ, 'unisex')\n      -\u003esortBy('price' SortByOrder::DESC)\n      -\u003elimit(5)\n      -\u003eoffset(1);\n\n$results = $client-\u003esearch($query);\n```\n\n## Managing your index\n\n```php\nuse OramaCloud\\Manager\\IndexManager;\n\n$index = new IndexManager('\u003cYour Index-ID\u003e', '\u003cYour Private API Key\u003e');\n\n// Empty data\n$index-\u003eempty();\n\n// Insert records\n$index-\u003einsert([\n    ['id' =\u003e '1', 'name' =\u003e 'John Doe', 'age' =\u003e 20 ],\n    ['id' =\u003e '2', 'name' =\u003e 'Mario Rossi', 'age' =\u003e 25 ],\n    ['id' =\u003e '3', 'name' =\u003e 'John Smith', 'age' =\u003e 35 ],\n]);\n\n// Update records\n$index-\u003eupdate([[ 'id' =\u003e '1', 'name' =\u003e 'Jane Doe', 'age' =\u003e 30 ]]);\n\n// Delete records\n$index-\u003edelete(['1', '2']);\n\n// Trigger deployment\n$index-\u003edeploy();\n```\n\n## Run Tests\n\n```sh\ncomposer test\n```\n\n### License\n\nApache-2.0 license. Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foramasearch%2Foramacloud-client-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foramasearch%2Foramacloud-client-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foramasearch%2Foramacloud-client-php/lists"}