This repository contains an OpenSearch client written in Ocaml.
It is modeled after their official clients published in their GitHub organization
This client is unreleased as it is a work in progress.
The client is built using common Ocaml community libraries:
For now, see the tests. The client API will probably change over time until the first released version.
Until we create a mock, we use mitmproxy and a real OpenSearch cluster for testing. All tests try to call mitmproxy which then redirects to the opensearch backend listening on https://localhost:9200.
In mitmproxy we can see the requests and responses manually, as the tests only check whether the response was not an HTTP error code.
We follow the OpenSearch APIreference to implement the client. Our aim is to provide a client as complete as possible.
- Analyze API
- CAT API
- Cluster
- Count
- Document
- Explain
- Index
- Ingest
- Multi-search
- Nodes
- Profile
- Ranking evaluation
- Remote cluster
- Scripts
- Scroll
- Search
- Search temapltes
- Snapshots
- Tasks
OpenSearch has a lot of objects which conform the payload for a lot of APIs. We should implement builders for the most important ones:
A nice addition would be to add support to the stantard OpenSearch plugins APIs: