Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

elastic/elasticsearch-serverless-php

Repository files navigation

Elasticsearch Serverless Client

main

This is the official Elastic client for the Elasticsearch Serverless service, still in private preview. If you're looking to develop your PHP application with the Elasticsearch Stack, you should look at the Elasticsearch Client instead. If you're looking to develop your PHP application with Elastic Enterprise Search, you should look at the Enterprise Search Client.

Installation

You can install the library using composer with the following command:

composer require elastic/elasticsearch-serverless

You need specify the version, if you want to install an alpha or rc release. For instance, if you want to install the latest alpha version:

composer require elastic/elasticsearch-serverless:*@alpha

Please remember that alpha releases are quite unstable, the code can change between releases. Instead, a release candidate rc will not break the backward compatibility. Typically an rc version includes only bug fixes.

Instantiate a Client

When you have installed elasticsearch-php you can start using it with the `Client`` class. You can use the ClientBuilder class to create this object:

require 'vendor/autoload.php';

use Elastic\Elasticsearch\Serverless\ClientBuilder;

$client = ClientBuilder::create()
  ->setEndpoint('<elasticsearch-endpoint>')
  ->setApiKey('<api-key>')
  ->build();

# $client is an object of Elastic\Elasticsearch\Serverless\Client class

Usage

You can read to the official documentation page for a getting started guide.

Development

See CONTRIBUTING.

Docs

Some questions, assumptions and general notes about this project can be found in the docs directory.

License 📗

MIT © Elastic

About

Official PHP client for Elasticsearch Serverless

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages