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.1.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.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_opensearch-0.4.1.tar.gz
Algorithm Hash digest
SHA256 9723b7aba66ad35d2745dcf5e94befd111e9439272d0f17b86adbda3c18fe5b6
MD5 fa5c55a80ef02dc52b760eb0fa2e054d
BLAKE2b-256 7f5e383217ac3ec630b5a5f0bdd6c31666c129daa100ae4ba032d21d7f5c46a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_readers_opensearch-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b815b6eeac7c8c93401bf605f6f23397d8a7cd22368d43dbf7873b8ae84195bd
MD5 e9b38cf1c5c3acdb3b9012e51159e704
BLAKE2b-256 164ba89e27b735b3dde335803022f2991badcb2e9b2dfcd9d7c7e7a559632469

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