Skip to content

Getting Started

Nikita Ganzikov edited this page Jan 6, 2026 · 1 revision

Getting Started

Installation

Using Go

git clone https://github.com/nnstd/bright.git
cd bright
go mod download
go build -o search-db .
./search-db

Using Docker

docker pull ghcr.io/nnstd/bright:latest
docker run -p 3000:3000 -v $(pwd)/data:/root/data ghcr.io/nnstd/bright:latest

Configuration

The 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

First Steps

  1. Create an index:
curl -X POST "http://localhost:3000/indexes?id=myindex&primaryKey=id"
  1. 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"}'
  1. Search:
curl -X POST "http://localhost:3000/indexes/myindex/searches?q=hello"

Testing

Run the included test script to verify your installation:

./test-api.sh

This script tests all API endpoints and demonstrates common use cases.

Clone this wiki locally