llama-index readers opensearch integration
Project description
Opensearch Loader
pip install llama-index-readers-opensearch
The Opensearch Loader returns a set of texts corresponding to documents retrieved from an Opensearch index. The user initializes the loader with an Opensearch index. They then pass in a field, and optionally a JSON query DSL object to fetch the fields they want.
Usage
Here's an example usage of the OpensearchReader to load 100 documents.
from llama_index.readers.opensearch import OpensearchReader
reader = OpensearchReader(
host="localhost",
port=9200,
index="<index_name>",
basic_auth=("<user_name>", "<password>"),
)
query = {"size": 100, "query": {"match_all": {}}}
documents = reader.load_data(
"<field_name>", query=query, embedding_field="field_name"
)
This loader is designed to be used as a way to load data into LlamaIndex.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file llama_index_readers_opensearch-0.3.0.tar.gz
.
File metadata
- Download URL: llama_index_readers_opensearch-0.3.0.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b25ff145152c76aada43b5e6e92ea3e912ec901750134a9e12134c0211230ea |
|
MD5 | 7bb55d08a466585699b8f14e0aeba672 |
|
BLAKE2b-256 | 17ec9b553d7fbf4cb563639c2ca76ee5afa66620844cf3e29f1788b3c71abad8 |
File details
Details for the file llama_index_readers_opensearch-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_readers_opensearch-0.3.0-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 770e861d021ece5388551b45f5959fda34468a7225d888d5d873bc38eee7faf5 |
|
MD5 | bfef0f6d17139e7f31207dd27a800544 |
|
BLAKE2b-256 | 5ae100869ead5b102608a589ea601ac0d0f62d802815a73f5e28b2897add9fb1 |