A lightweight, pure-Go, in-memory vector search plugin for Apache Answer. Designed for development and testing -- no external services, no Docker, no CGo required.
Not recommended for production -- all data is stored in memory and lost on restart.
Build Apache Answer with this plugin:
./answer build --with github.com/apache/answer-plugins/vector-search-memory
No special environment variables needed. Works with CGO_ENABLED=0.
After enabling the plugin in the Admin UI (Admin > Plugins > Vector Search), configure the following fields:
| Field | Description | Example |
|---|---|---|
| Embedding API Host | OpenAI-compatible API base URL | https://api.openai.com |
| Embedding API Key | API key for the embedding service | sk-... |
| Embedding Model | Model name for generating embeddings | text-embedding-3-small |
| Embedding Level | question embeds question + all answers + comments together; answer embeds each answer separately | question |
| Similarity Threshold | Minimum cosine similarity score (0-1). Default 0 means no filtering | 0.5 |
No connection endpoint or database path is needed -- everything runs in-process.
map[string]*document guarded by sync.RWMutexFor production use, consider pgvector, Elasticsearch, Weaviate, Milvus, Qdrant, or ChromaDB.