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.
At first glance, it behaves like a relay, but it only handles requests related to NIP-50. Unlike normal relays, it connects to other relays to retrieve notes. It ignores any events (EVENT
) from the clients. Queries are interpreted as Simple query string query.
👻 This project was created as an exercise in Rust programming for the author. 👻
- Supports filters that contains only one
"search"
property. - Supports only kind=1.
- No spam filtering. 🙁
- No indexing configurations. Just does N-gram indexing with some normalization.
Start server:
cp .env.example .env
# Edit .env to configure relays to connect to
docker compose up
Search:
wscat --connect ws://localhost:3000
Connected (press CTRL+C to quit)
> ["REQ", "SEARCH_TEST", {"search": "nostr|damus"}]
(...snip...)
< ["EOSE","SEARCH_TEST"]
>
See docker-compose.yaml
and .env.example
for the configuration.
NOSTR_RELAYS
can be a comma-separated list of relay URLs.