Skip to content
Snippets Groups Projects
Unverified Commit c01beee1 authored by Yong woo Song's avatar Yong woo Song Committed by GitHub
Browse files

fix: elasticsearch indexstore for collection name to index (#12672)

parent 3bdcfa6e
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,12 @@ class ElasticsearchIndexStore(KVIndexStore): ...@@ -16,7 +16,12 @@ class ElasticsearchIndexStore(KVIndexStore):
def __init__( def __init__(
self, self,
elasticsearch_kvstore: ElasticsearchKVStore, elasticsearch_kvstore: ElasticsearchKVStore,
collection_index: Optional[str] = None,
namespace: Optional[str] = None, namespace: Optional[str] = None,
) -> None: ) -> None:
"""Init a ElasticsearchIndexStore.""" """Init a ElasticsearchIndexStore."""
super().__init__(elasticsearch_kvstore, namespace=namespace) super().__init__(elasticsearch_kvstore, namespace=namespace)
if collection_index:
self._collection = collection_index
else:
self._collection = f"llama_index-index_store.data-{self._namespace}"
...@@ -27,7 +27,7 @@ exclude = ["**/BUILD"] ...@@ -27,7 +27,7 @@ exclude = ["**/BUILD"]
license = "MIT" license = "MIT"
name = "llama-index-storage-index-store-elasticsearch" name = "llama-index-storage-index-store-elasticsearch"
readme = "README.md" readme = "README.md"
version = "0.1.2" version = "0.1.3"
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = ">=3.8.1,<4.0" python = ">=3.8.1,<4.0"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment