Configure Elasticsearch as search engine
To configure Elasticsearch as your Search Engine, you must follow these steps:
- From the Ghost Code injection, insert the following code into the Site Header
<script type="text/javascript"> var elasticsearch_username = '<ELASTICSEARCH_USERNAME>'; var elasticsearch_password = '<ELASTICSEARCH_PASSWORD>'; var elasticsearch_auth = btoa(elasticsearch_username + ":" + elasticsearch_password); </script>
- If your Elasticsearch endpoint URL is different than the suggested one (
/api/search
), then precise the URL in addition to the other information:var elasticsearch_endpoint = 'https://my-elasticsearch.com';