https://github.com/resonatecoop/search
Search API
https://github.com/resonatecoop/search
elasticsearch koa mongodb nodejs
Last synced: 5 months ago
JSON representation
Search API
- Host: GitHub
- URL: https://github.com/resonatecoop/search
- Owner: resonatecoop
- License: mit
- Created: 2020-10-13T14:19:00.000Z (over 5 years ago)
- Default Branch: development
- Last Pushed: 2022-09-15T12:07:59.000Z (almost 4 years ago)
- Last Synced: 2025-10-11T06:24:36.223Z (8 months ago)
- Topics: elasticsearch, koa, mongodb, nodejs
- Language: JavaScript
- Homepage:
- Size: 548 KB
- Stars: 2
- Watchers: 5
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> 🛠**Status: Maintenance Mode | Stable**
>
> This project is currently in [maintenance mode](https://en.wikipedia.org/wiki/Maintenance_mode) - users should feel free to continue to use this app and expect bug fixes, but not expect many additional features.
# Resonate Search Demo
## Stack
- Mongodb with mongoose and mongoosastic
- Elasticsearch
- Koajs
## Models
- Track
- Profile
- Release
## Sync data
To save/update data into elasticsearch, the following script needs to be ran
```sh
babel-node -r ./node_modules/dotenv-safe/config ./src/scripts/migrate run
```
It's configured to connect to our wordpress db which also have a table for tracks.
## Query
With no minimum query length, fuzzy query is possible. The results will be merged and sorted by score.
Use the 'kind' field to identify the model (track|artist|label|band)
```json
[
{
"kind": "track",
"title": "capitalism crashed",
"display_artist": "AGF",
"album": "capitalism crashed",
"tags": ["experimental"]
}
]
```
## Flow
```flow
st=>start: Search API
e=>end: Return error
query=>operation: Query
cond=>condition: Invalid query?
io=>inputoutput: catch error...
para=>parallel: Search tracks and profiles
response=>end: Return merged results sorted by score
st->query->cond
cond(no)->para
cond(yes)->io->e
para(path1, bottom)->response(right)
para(path2, top)
```
## UI Design
