Skip to main content

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

llama_index_readers_opensearch-0.3.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file llama_index_readers_opensearch-0.3.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_opensearch-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9b25ff145152c76aada43b5e6e92ea3e912ec901750134a9e12134c0211230ea
MD5 7bb55d08a466585699b8f14e0aeba672
BLAKE2b-256 17ec9b553d7fbf4cb563639c2ca76ee5afa66620844cf3e29f1788b3c71abad8

See more details on using hashes here.

File details

Details for the file llama_index_readers_opensearch-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_opensearch-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 770e861d021ece5388551b45f5959fda34468a7225d888d5d873bc38eee7faf5
MD5 bfef0f6d17139e7f31207dd27a800544
BLAKE2b-256 5ae100869ead5b102608a589ea601ac0d0f62d802815a73f5e28b2897add9fb1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page