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.4.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

File details

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

File metadata

File hashes

Hashes for llama_index_readers_opensearch-0.4.0.tar.gz
Algorithm Hash digest
SHA256 64978427396ac0d2fe10723f62078bae16ab601a38c5ab187668e9ac0aee6773
MD5 a8e54862d597eed6e829ae12307866b3
BLAKE2b-256 5ab6a74665b8bf7908e07dfab7823edeaf3d568dc0c38d8abb78c0374170ba5a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_readers_opensearch-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f1bfc720541882613a518732f7f30a2287190d44b5d0dfed54095bb2bd895e8
MD5 7958f75a261eb832c6cfa1b14a121cd1
BLAKE2b-256 d3ab80686bf5d7c12ae21841d9b87c844d02c5d2bb74d3e3e9d5b75d9242306c

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 Pingdom Monitoring Sentry Error logging StatusPage Status page