Skip to content

Commit

Permalink
Update elasticsearch-document-store.md code examples and links
Browse files Browse the repository at this point in the history
  • Loading branch information
bilgeyucel authored Dec 12, 2023
1 parent 33c26ed commit 037e2d9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions integrations/elasticsearch-document-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ authors:
github: deepset-ai
twitter: deepset_ai
linkedin: deepset-ai
pypi: https://pypi.org/project/farm-haystack
repo: https://github.com/deepset-ai/haystack
pypi: https://pypi.org/project/elasticsearch-haystack
repo: https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/opensearch
type: Document Store
report_issue: https://github.com/deepset-ai/haystack/issues
report_issue: https://github.com/deepset-ai/haystack-core-integrations/issues
logo: /logos/elastic.png
version: Haystack 2.0
toc: true
Expand Down Expand Up @@ -47,7 +47,7 @@ Once installed, you can start using your Elasticsearch database with Haystack by
```python
from elasticsearch_haystack.document_store import ElasticsearchDocumentStore

document_store = ElasticsearchDocumentStore(host = "http://localhost:9200", embedding_dim = 768)
document_store = ElasticsearchDocumentStore(hosts = "http://localhost:9200")
```

#### Writing Documents to ElasticsearchDocumentStore
Expand All @@ -65,7 +65,7 @@ from haystack.components.converters import TextFileToDocument
from haystack.components.preprocessors import DocumentSplitter
from haystack.components.writers import DocumentWriter

document_store = ElasticsearchDocumentStore(host = "http://localhost:9200")
document_store = ElasticsearchDocumentStore(hosts = "http://localhost:9200")
converter = TextFileToDocument()
splitter = DocumentSplitter()
doc_embedder = SentenceTransformersDocumentEmbedder(model_name_or_path="sentence-transformers/multi-qa-mpnet-base-dot-v1")
Expand Down Expand Up @@ -178,4 +178,4 @@ query_pipeline.add_node(component=retriever, name="Retriever", inputs=["Query"])
query_pipeline.add_node(component=prompt_node, name="PromptNode", inputs=["Retriever"])

query_pipeline.run(query = "Where is Istanbul?")
```
```

0 comments on commit 037e2d9

Please sign in to comment.