Metadata-Version: 2.4
Name: llama-index-readers-solr
Version: 0.1.0
Summary: llama-index readers solr integration
Author-email: Xiaoyu Ouyang <xouyang1@bloomberg.net>, Atharva Tendle <atendle@bloomberg.net>, Steven Butler <sbutler81@bloomberg.net>, Vikramjeet Das <vdas22@bloomberg.net>, Yong Zhuang <yzhuang52@bloomberg.net>
Maintainer-email: Xiaoyu Ouyang <xouyang1@bloomberg.net>, Atharva Tendle <atendle@bloomberg.net>, Steven Butler <sbutler81@bloomberg.net>, Vikramjeet Das <vdas22@bloomberg.net>, Yong Zhuang <yzhuang52@bloomberg.net>
License-Expression: MIT
License-File: LICENSE
Requires-Python: <4.0,>=3.9
Requires-Dist: llama-index-core<0.15,>=0.14.0
Requires-Dist: pysolr>=3.10.0
Description-Content-Type: text/markdown

# LlamaIndex Readers Integration: Solr

## Overview

Solr Reader retrieves documents through an existing Solr index. These documents can then be used in a downstream LlamaIndex data structure.

### Installation

You can install Solr Reader via pip:

```bash
pip install llama-index-readers-solr
```

## Usage

```python
from llama_index.readers.solr import SolrReader

# Initialize SolrReader with the Solr URL. The Solr URL should include the path
# to the core (if single node) or collection (if Solr Cloud).
reader = SolrReader(endpoint="<Endpoint with full solr path>")

# Load data from Solr index
documents = reader.load_data(
    query={"q": "*:*", "rows": 10},  # Solr query parameters
    field="content_t",  # Only results with populated values in this field will be returned
    metadata_fields=["title_t", "category_s"],
)
```

This loader is designed to be used as a way to load data into
[LlamaIndex](https://github.com/run-llama/llama_index/tree/main/llama_index) and/or subsequently
used as a Tool in a [LangChain](https://github.com/hwchase17/langchain) Agent.
