{"id":18828537,"url":"https://github.com/samuelgja/elastic-tiny-client","last_synced_at":"2025-04-14T03:08:53.494Z","repository":{"id":175601905,"uuid":"618947815","full_name":"samuelgja/elastic-tiny-client","owner":"samuelgja","description":"Zero dependency, fetch based tiny elasticsearch client.","archived":false,"fork":false,"pushed_at":"2024-11-17T19:03:33.000Z","size":306,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-14T03:08:44.052Z","etag":null,"topics":["bun","client","elasticsearch","nodejs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samuelgja.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-03-25T20:11:28.000Z","updated_at":"2024-11-17T19:03:38.000Z","dependencies_parsed_at":"2024-10-28T12:21:06.782Z","dependency_job_id":"531c96a8-a4ae-46d7-a383-aa3546783631","html_url":"https://github.com/samuelgja/elastic-tiny-client","commit_stats":{"total_commits":29,"total_committers":1,"mean_commits":29.0,"dds":0.0,"last_synced_commit":"f35908c8478822601027726acbf056ae8e60a32e"},"previous_names":["samuelgja/elastic-tiny-client"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelgja%2Felastic-tiny-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelgja%2Felastic-tiny-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelgja%2Felastic-tiny-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelgja%2Felastic-tiny-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samuelgja","download_url":"https://codeload.github.com/samuelgja/elastic-tiny-client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248813795,"owners_count":21165634,"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":["bun","client","elasticsearch","nodejs"],"created_at":"2024-11-08T01:30:40.896Z","updated_at":"2025-04-14T03:08:53.469Z","avatar_url":"https://github.com/samuelgja.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elastic search tiny client\n\n[![Build](https://github.com/samuelgja/elastic-tiny-client/actions/workflows/build.yml/badge.svg)](https://github.com/samuelgja/elastic-tiny-client/actions/workflows/build.yml) [![Code quality check](https://github.com/samuelgja/elastic-tiny-client/actions/workflows/code-check.yml/badge.svg)](https://github.com/samuelgja/elastic-tiny-client/actions/workflows/code-check.yml)\n[![Build Size](https://img.shields.io/bundlephobia/minzip/elastic-tiny-client?label=Bundle%20size)](https://bundlephobia.com/result?p=elastic-tiny-client) [![NPM downloads](https://img.shields.io/npm/dm/elastic-tiny-client.svg?style=flat)](https://www.npmjs.com/package/elastic-tiny-client)\n\n\nZero dependency, fetch based tiny elasticsearch client.\n\nAlso it work's in browser, [node.js](http://nodejs.org/) and [bun](https://bun.sh/) 🥳\nProbably can be also run in [deno](https://deno.land/), but not tested yet.\n\n\nWhy? Because I needed a elasticsearch client for [bun](https://bun.sh/) but [elasticsearch-js](https://github.com/elastic/elasticsearch-js) still not works 🥺\n\n### Install\n\n```bash \nyarn add elastic-tiny-client // or bun add elastic-tiny-client\n```\n\n\n### Simple usage\n\n```ts\nimport { ElasticClient } from 'elastic-tiny-client'\nconst client = new ElasticClient({ hosts: ['http://localhost:9200'] })\n\n\nconst indexResult = await client.index({\n  index: 'my-index',\n  body: {\n    title: 'test',\n  },\n})\n\nconst result = await client.search({\n  index: 'my-index',\n  body: {\n    query: {\n      match: {\n        title: 'test',\n      },\n    },\n  },\n})\n\n\nconst deleteResult = await client.delete({\n  index: 'my-index',\n  id: indexResult.body._id,\n})\n```\n\n\n\nBasic api are taken from [elasticsearch-rest-api-docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-apis.html).\nThere are still some parts missing, so PR's are welcome 😎.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelgja%2Felastic-tiny-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuelgja%2Felastic-tiny-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelgja%2Felastic-tiny-client/lists"}