nlweb-elastic-vectordb
Elasticsearch provider for NLWeb.
Overview
This package provides Elasticsearch vector database support for NLWeb, demonstrating how to create third-party provider packages.
Installation
pip install nlweb-core nlweb-elastic-vectordb
For LLM and embedding, you'll also need a model provider:
pip install nlweb-azure-models
Or use the bundle packages:
pip install nlweb-core nlweb-retrieval nlweb-models
Configuration
Create config.yaml:
retrieval:
provider: elasticsearch
import_path: nlweb_elastic_vectordb.elasticsearch_client
class_name: ElasticsearchClient
api_endpoint_env: ELASTICSEARCH_ENDPOINT
api_key_env: ELASTICSEARCH_API_KEY
index_name: my-index
Authentication
Set environment variables:
export ELASTICSEARCH_ENDPOINT=https://your-cluster.elasticsearch.com
export ELASTICSEARCH_API_KEY=your_api_key_here
Usage
import nlweb_core
# Initialize
nlweb_core.init(config_path="./config.yaml")
# Search
from nlweb_core import retriever
results = await retriever.search(
query="example query",
site="example.com",
num_results=10
)
Features
- Vector similarity search with Elasticsearch
- KNN search with filtering
- Configurable index names
- API key authentication
- Compatible with NLWeb Protocol v0.5
Creating Your Own Provider Package
Use this package as a template:
-
Create package structure:
nlweb-yourprovider/ ├── pyproject.toml ├── README.md └── nlweb_yourprovider/ ├── __init__.py └── your_client.py -
Implement VectorDBClientInterface:
from nlweb_core.retriever import VectorDBClientInterface class YourClient(VectorDBClientInterface): async def search(self, query, site, num_results, **kwargs): # Your implementation pass
-
Declare dependencies in
pyproject.toml:dependencies = [ "nlweb-core>=0.5.0", "your-provider-sdk>=1.0.0", ]
-
Publish to PyPI:
python -m build twine upload dist/*
License
MIT License - Copyright (c) 2025 Microsoft Corporation
Metadata
Release files for nlweb-elastic-vectordb 0.5.42
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nlweb_elastic_vectordb-0.5.42.tar.gz | 12.3 kB | Without provenance | Details for nlweb_elastic_vectordb-0.5.42.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nlweb_elastic_vectordb-0.5.42-py3-none-any.whl | Python 3 | none | any | Details for nlweb_elastic_vectordb-0.5.42-py3-none-any.whl |
Total release size: 21.2 kB
Release files / nlweb_elastic_vectordb-0.5.42.tar.gz
| Download URL | nlweb_elastic_vectordb-0.5.42.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2636ad54a947d2a047c569b9105488d4f1dd0c0864529be5374c606b5296c0b
|
|
BLAKE2b-256 checksum How to use checksums |
682c1f4513db0bac0bfad5f062693e81034915727b2a52502bcef2668c86e240
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Release files / nlweb_elastic_vectordb-0.5.42-py3-none-any.whl
| Download URL | nlweb_elastic_vectordb-0.5.42-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23238ad4628af6f8bc5c6bc9a2f77cd9d31554e5ba10d05a815028f53a2c9aab
|
|
BLAKE2b-256 checksum How to use checksums |
ed2281c6e90cd32255f022878fbed0a3062fafec8601e4956daf9d5072d94ecf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Security for nlweb-elastic-vectordb 0.5.42
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.