Skip to main content

llama-index-opensolr

LlamaIndex integration for Opensolr — managed Apache Solr as a vector store, with server-side embeddings and native hybrid (BM25 + kNN) search.

No local embedding model. No third-party embedding API key. One set of credentials; vectors are computed on Opensolr's GPU infrastructure (multilingual E5-large-instruct, 1024 dimensions, cosine).

Product page: opensolr.com/langchain · free 15-day trial, no card, at opensolr.com

pip install llama-index-opensolr

Quickstart

from llama_index.core import VectorStoreIndex, StorageContext, Document
from llama_index.vector_stores.opensolr import OpensolrVectorStore
from llama_index.embeddings.opensolr import OpensolrEmbedding

store = OpensolrVectorStore(
    index_name="mysite__dense",
    email="you@example.com",
    api_key="YOUR_OPENSOLR_API_KEY",
    create_if_missing=True,
)
embed_model = OpensolrEmbedding(
    email="you@example.com", api_key="YOUR_OPENSOLR_API_KEY",
    index_name="mysite__dense",
)

index = VectorStoreIndex.from_documents(
    [Document(text="Hybrid search fuses BM25 with vector similarity")],
    storage_context=StorageContext.from_defaults(vector_store=store),
    embed_model=embed_model,
)

retriever = index.as_retriever(similarity_top_k=5)
print(retriever.retrieve("how do keyword and semantic search combine?"))

Hybrid search

Opensolr fuses BM25 and kNN scores per document with its native {!hybrid} Solr query parser:

from llama_index.core.vector_stores.types import VectorStoreQuery, VectorStoreQueryMode

result = store.query(VectorStoreQuery(
    query_str="affordable restaurants",
    similarity_top_k=5,
    mode=VectorStoreQueryMode.HYBRID,
    alpha=0.5,          # 0 = all semantic … 1 = all lexical
))

Metadata filters

Standard LlamaIndex MetadataFilters (EQ, NE, IN, NIN, GT/GTE, LT/LTE) map to Solr fq — and every index is also plain Apache Solr with the native /select API when you need facets, highlighting, or anything beyond retrieval.

Notes

  • Vector-enabled indexes run on Opensolr's Solr 9.x environments — currently us (Chicago), de (Germany), fi (Finland). The list is fetched live from the platform; additional dedicated regions can be deployed on request (paid add-on): support@opensolr.com.
  • Siblings: langchain-opensolr (LangChain) · opensolr-mcp (MCP server for agents).

MIT license.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_opensolr-0.1.0.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_opensolr-0.1.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_opensolr-0.1.0.tar.gz.

File metadata

  • Download URL: llama_index_opensolr-0.1.0.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.12

File hashes

Hashes for llama_index_opensolr-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a642834e20ba83b41e677ee755e60dfe71ff77b68d8be9c4edbc4e9d2a8f13a0
MD5 e106c9aea0c87af3e6a710c2ce0180ac
BLAKE2b-256 e7fe38f222a0c52b7acdc783145d8c9296c49833f5d3336f532284d778daaca8

See more details on using hashes here.

File details

Details for the file llama_index_opensolr-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_opensolr-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 787025266ea6942614bb199dd16ba1de792034e609da3d9d3163e399a3817960
MD5 68c62bc8864d9bb187e6f1b54dc6ffee
BLAKE2b-256 a098f8991fed1adac0d0c3cac1024f013bb83fc24b708b286d4e4a9b37fdb81c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page