Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hyper63/hyper-adapter-elasticsearch
Elasticsearch adapter for Hyper Search port
https://github.com/hyper63/hyper-adapter-elasticsearch
clean-architecture deno elasticsearch full-text-search hyper ports-and-adapters search service-framework
Last synced: 7 days ago
JSON representation
Elasticsearch adapter for Hyper Search port
- Host: GitHub
- URL: https://github.com/hyper63/hyper-adapter-elasticsearch
- Owner: hyper63
- License: apache-2.0
- Created: 2021-06-17T16:43:15.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-28T23:42:49.000Z (about 1 year ago)
- Last Synced: 2024-11-13T18:09:34.982Z (2 months ago)
- Topics: clean-architecture, deno, elasticsearch, full-text-search, hyper, ports-and-adapters, search, service-framework
- Language: JavaScript
- Homepage:
- Size: 157 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
hyper-adapter-elasticsearch
A Search port adapter that uses Elasticsearch to index documents for full text search in the hyper service framework
---
- [Table of Contents](#table-of-contents)
- [Getting Started](#getting-started)
- [Installation](#installation)
- [Features](#features)
- [Methods](#methods)
- [Testing](#testing)
- [Contributing](#contributing)
- [License](#license)## Getting Started
```js
import { default as elasticsearch } from 'https://x.nest.land/[email protected]/mod.js'export default {
app,
adapter: [
{
port: 'search',
plugins: [elasticsearch({ url: 'http://localhost:9200' })],
},
],
}
```## Installation
This is a Deno module available to import from
[nest.land](https://nest.land/package/hyper-adapter-elasticsearch)deps.js
```js
export { default as elasticsearch } from 'https://x.nest.land/[email protected]/mod.js'
```## Features
- create an index in Elasticsearch
- delete an index in Elasticsearch
- index a document using Elasticsearch
- retrieving an indexed document from Elasticsearch index
- update an indexed document in Elasticsearch index
- remove an indexed document from Elasticsearch index
- bulk operation to index multiple docs using Elasticsearch (uses Elasticsearches
[bulk api](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html#docs-bulk))
- query an Elasticsearch index## Methods
This adapter fully implements the Search port and can be used as the
[hyper Search service](https://docs.hyper.io/search-api) adapterSee the full port [here](https://nest.land/package/hyper-port-search)
## Testing
- Spin up docker image locally
```sh
docker run \
-p 9200:9200 -p 9600:9600 \
-e "discovery.type=single-node" \
-v /workspace/hyper-adapter-elasticsearch/scripts/opensearch.yml:/usr/share/opensearch/config/opensearch.yml \
opensearchproject/opensearch:1.2.3
```- Run hyper
```sh
./scripts/hyper.sh
```- Run hyper-test
```
```## Contributing
Contributions are welcome! See the hyper
[contribution guide](https://docs.hyper.io/contributing-to-hyper)## License
Apache-2.0