https://github.com/lmangani/gun-elastic
Elasticsearch storage adapter for Gun DB :gun:
https://github.com/lmangani/gun-elastic
elastic elasticsearch graph gun gundb nodejs persistence relation-extraction storage
Last synced: 2 months ago
JSON representation
Elasticsearch storage adapter for Gun DB :gun:
- Host: GitHub
- URL: https://github.com/lmangani/gun-elastic
- Owner: lmangani
- License: mit
- Created: 2018-01-15T10:43:14.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-06-18T19:37:41.000Z (over 1 year ago)
- Last Synced: 2025-03-27T20:12:17.541Z (6 months ago)
- Topics: elastic, elasticsearch, graph, gun, gundb, nodejs, persistence, relation-extraction, storage
- Language: JavaScript
- Homepage: http://qxip.net
- Size: 43 KB
- Stars: 29
- Watchers: 3
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# Gun-Elastic
Elasticsearch native persistence layer for [Gun](https://github.com/amark/gun), a realtime, distributed, offline-first, graph database engine.This `gun` storage adapter interfaces with Elasticsearch using an extended `flint node` strategy:
* `get` request expect to read an entire Gun node.
* `put` requests write an entire Gun node.
* `node` key-value structure _(soul,relation,field,value,state)_ optionally saved to secondary index### THIS WORK IS EXPERIMENTAL WORK IN PROGRESS! USE AT YOUR OWN RISK!
#### Comments and PR/Contributions are super welcome!-------------
## Installation`npm install gun-elastic`.
```javascript
const Gun = require('gun');
// Must be added after Gun but before instantiating Gun
require('gun-elastic');// Instantiate Gun
const gun = new Gun({
file: false,
web: httpServer,// The following are defaults.
elastic: {
host: 'localhost',
port: '9200',
index: 'gun_es',
type: 'gun_data',
store_keys: false,
store_keys_index: 'gun_es_keys'
}
});
```## Screenshots
#### Filtered Network Relations
Search and Display node relations using the [kbn_graph](https://github.com/lmangani/kbn_graph) plugin
### Todo
* [x] Optional Key Storage in secondary index
* [ ] Authentication support, array of servers, etc
* [ ] Add tests with ES mockups## Acknowledgement
Gun is open-sourced and copyrighted by Mark NadalElasticsearch and Kibana are trademarks of Elasticsearch BV, registered in the U.S. and in other countries.
This extension is made possible by [gun-flint](https://github.com/sjones6/gun-flint) @sjones6
## Issues & Contributing
Issues welcome on [Github](https://github.com/lmangani/gun-elastic/issues).
Community contributions welcome. PRs accepted after code review.