-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Nikita Ganzikov edited this page Jan 6, 2026
·
1 revision
git clone https://github.com/nnstd/bright.git
cd bright
go mod download
go build -o search-db .
./search-dbdocker pull ghcr.io/nnstd/bright:latest
docker run -p 3000:3000 -v $(pwd)/data:/root/data ghcr.io/nnstd/bright:latestThe server starts on port 3000 by default.
Data is stored in the ./data directory, which contains:
- Index files (one directory per index)
-
configs.json- Index configurations
- Create an index:
curl -X POST "http://localhost:3000/indexes?id=myindex&primaryKey=id"- Add documents:
curl -X POST "http://localhost:3000/indexes/myindex/documents" \
-H "Content-Type: application/json" \
-d '{"id": "1", "title": "Hello World", "content": "This is my first document"}'- Search:
curl -X POST "http://localhost:3000/indexes/myindex/searches?q=hello"Run the included test script to verify your installation:
./test-api.shThis script tests all API endpoints and demonstrates common use cases.