llama-index-readers-opensearch


Namellama-index-readers-opensearch JSON
Version 0.3.0 PyPI version JSON
download
home_pageNone
Summaryllama-index readers opensearch integration
upload_time2024-11-18 00:16:32
maintainerchnsagitchen
docs_urlNone
authorYour Name
requires_python<4.0,>=3.9
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Opensearch Loader

```bash
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.

```python
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](https://github.com/run-llama/llama_index/).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "llama-index-readers-opensearch",
    "maintainer": "chnsagitchen",
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/17/ec/9b553d7fbf4cb563639c2ca76ee5afa66620844cf3e29f1788b3c71abad8/llama_index_readers_opensearch-0.3.0.tar.gz",
    "platform": null,
    "description": "# Opensearch Loader\n\n```bash\npip install llama-index-readers-opensearch\n```\n\nThe Opensearch Loader returns a set of texts corresponding to documents retrieved from an Opensearch index.\nThe 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.\n\n## Usage\n\nHere's an example usage of the OpensearchReader to load 100 documents.\n\n```python\nfrom llama_index.readers.opensearch import OpensearchReader\n\nreader = OpensearchReader(\n    host=\"localhost\",\n    port=9200,\n    index=\"<index_name>\",\n    basic_auth=(\"<user_name>\", \"<password>\"),\n)\n\nquery = {\"size\": 100, \"query\": {\"match_all\": {}}}\ndocuments = reader.load_data(\n    \"<field_name>\", query=query, embedding_field=\"field_name\"\n)\n```\n\nThis loader is designed to be used as a way to load data into [LlamaIndex](https://github.com/run-llama/llama_index/).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "llama-index readers opensearch integration",
    "version": "0.3.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5ae100869ead5b102608a589ea601ac0d0f62d802815a73f5e28b2897add9fb1",
                "md5": "bfef0f6d17139e7f31207dd27a800544",
                "sha256": "770e861d021ece5388551b45f5959fda34468a7225d888d5d873bc38eee7faf5"
            },
            "downloads": -1,
            "filename": "llama_index_readers_opensearch-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bfef0f6d17139e7f31207dd27a800544",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 3037,
            "upload_time": "2024-11-18T00:16:31",
            "upload_time_iso_8601": "2024-11-18T00:16:31.966875Z",
            "url": "https://files.pythonhosted.org/packages/5a/e1/00869ead5b102608a589ea601ac0d0f62d802815a73f5e28b2897add9fb1/llama_index_readers_opensearch-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "17ec9b553d7fbf4cb563639c2ca76ee5afa66620844cf3e29f1788b3c71abad8",
                "md5": "7bb55d08a466585699b8f14e0aeba672",
                "sha256": "9b25ff145152c76aada43b5e6e92ea3e912ec901750134a9e12134c0211230ea"
            },
            "downloads": -1,
            "filename": "llama_index_readers_opensearch-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7bb55d08a466585699b8f14e0aeba672",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 2745,
            "upload_time": "2024-11-18T00:16:32",
            "upload_time_iso_8601": "2024-11-18T00:16:32.864709Z",
            "url": "https://files.pythonhosted.org/packages/17/ec/9b553d7fbf4cb563639c2ca76ee5afa66620844cf3e29f1788b3c71abad8/llama_index_readers_opensearch-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-18 00:16:32",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-readers-opensearch"
}
        
Elapsed time: 0.32511s