tree: 38c9be1bfd5f3c2302ce184e89ace05c717a6a95
  1. i18n/
  2. go.mod
  3. go.sum
  4. info.yaml
  5. README.md
  6. sync.go
  7. weaviate.go
vector-search-weaviate/README.md

Apache Answer Plugin: Weaviate Vector Search

This plugin enables semantic/vector search in Apache Answer using Weaviate.

Prerequisites

  • Weaviate instance (self-hosted or Weaviate Cloud)
  • An OpenAI-compatible embedding API (e.g., OpenAI, Azure OpenAI, or any compatible provider)

Installation

Build Apache Answer with this plugin:

./answer build --with github.com/apache/answer-plugins/vector-search-weaviate

Configuration

After enabling the plugin in the Admin UI (Admin > Plugins > Vector Search), configure the following fields:

FieldDescriptionExample
Weaviate EndpointWeaviate server URLhttp://localhost:8080
Weaviate API KeyAPI key for Weaviate authentication (optional for local instances)
Embedding API HostOpenAI-compatible API base URLhttps://api.openai.com
Embedding API KeyAPI key for the embedding servicesk-...
Embedding ModelModel name for generating embeddingstext-embedding-3-small
Embedding Levelquestion embeds question + all answers + comments together; answer embeds each answer separatelyquestion
Similarity ThresholdMinimum cosine similarity score (0-1). Default 0 means no filtering0.5

Note: This plugin uses a dual API key pattern -- one for Weaviate authentication and a separate one for the embedding API.

How It Works

  • Weaviate handles vector dimensions automatically via its vectorizer: none configuration, so no manual dimension setup is needed.
  • On first configuration, the plugin creates a class AnswerVector with cosine distance metric.
  • Uses deterministic UUIDs derived from object IDs for consistent upsert behavior.
  • A full sync of all questions/answers is triggered when the plugin starts.

License

Apache License 2.0