elasticsearch.mdx 975 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. ---
  2. title: Elasticsearch
  3. ---
  4. Install related dependencies using the following command:
  5. ```bash
  6. pip install --upgrade 'embedchain[elasticsearch]'
  7. ```
  8. <Note>
  9. You can configure the Elasticsearch connection by providing either `es_url` or `cloud_id`. If you are using the Elasticsearch Service on Elastic Cloud, you can find the `cloud_id` on the [Elastic Cloud dashboard](https://cloud.elastic.co/deployments).
  10. </Note>
  11. You can authorize the connection to Elasticsearch by providing either `basic_auth`, `api_key`, or `bearer_auth`.
  12. <CodeGroup>
  13. ```python main.py
  14. from embedchain import App
  15. # load elasticsearch configuration from yaml file
  16. app = App.from_config(config_path="config.yaml")
  17. ```
  18. ```yaml config.yaml
  19. vectordb:
  20. provider: elasticsearch
  21. config:
  22. collection_name: 'es-index'
  23. cloud_id: 'deployment-name:xxxx'
  24. basic_auth:
  25. - elastic
  26. - <your_password>
  27. verify_certs: false
  28. ```
  29. </CodeGroup>
  30. <Snippet file="missing-vector-db-tip.mdx" />