Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/darashi/searchnos
Searchnos: a NIP-50 relay
https://github.com/darashi/searchnos
elasticsearch nostr
Last synced: about 1 month ago
JSON representation
Searchnos: a NIP-50 relay
- Host: GitHub
- URL: https://github.com/darashi/searchnos
- Owner: darashi
- License: mit
- Created: 2023-02-25T03:12:19.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-30T08:28:42.000Z (about 1 year ago)
- Last Synced: 2024-04-14T05:20:58.840Z (8 months ago)
- Topics: elasticsearch, nostr
- Language: Rust
- Homepage:
- Size: 294 KB
- Stars: 32
- Watchers: 2
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nostr-japan - searchnos - NIP-50の試験的な実装 by [darashi](https://github.com/darashi) (Relay implementations)
README
# Searchnos: a NIP-50 Relay (Search Notes and Other Stuff)
This is a relay-like bridge server that provides a Nostr full-text search capability by using Elasticsearch as a backend. It emulates real-time search by polling Elasticsearch.
Searchnos works like a relay, with an exception; Searchnos does not accept `EVENT` messages from regular connections. When opening a WebSocket connection, if a pre-configured API key is specified as `?api_key=foo` query parameter, the connection is treated specially as an administrative connection. Searchnos only receives `EVENT`s from such connections.
## Current Limitations
* No spam filtering. 🙁
* No indexing configurations. Just does N-gram indexing with some normalization.## Usage
Start server:
cp .env.example .env
# Edit .env to configure relays to connect to
docker compose upSearch:
wscat --connect ws://localhost:3000
Connected (press CTRL+C to quit)
> ["REQ", "SEARCH_TEST", {"search": "nostr"}]
(...snip...)
< ["EOSE","SEARCH_TEST"]
>## Configuration
See `compose.yaml` and `.env.example` for the configuration.
`SRC_RELAYS` and `DEST_RELAYS` can be a comma-separated list of relay URLs.