Skip to content

Commit

Permalink
Correct ElasticSearch -> Elasticsearch
Browse files Browse the repository at this point in the history
  • Loading branch information
seanh committed Oct 4, 2015
1 parent c2f05ff commit 2a8cc81
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion conf/production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pipeline: proxy-prefix raven h
[app:h]
use: egg:h

# ElasticSearch configuration
# Elasticsearch configuration
#es.host: http://localhost:9200
#es.index: annotator

Expand Down
12 changes: 6 additions & 6 deletions docs/INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ itself) the instructions for configuring and deploying h are identical.
In addition to the Docker container, h depends on the following services:

- An SQL database. We only officially support PostgreSQL_.
- ElasticSearch_ v1.0+, with the `ElasticSearch ICU Analysis`_ plugin
- Elasticsearch_ v1.0+, with the `Elasticsearch ICU Analysis`_ plugin
installed. Used for storing annotation data.
- NSQ_, a distributed message queue. Used for interprocess communication.
- Redis_, a fast key-value store. Used for persistent session storage.

.. _Docker: https://www.docker.com/
.. _PostgreSQL: http://www.postgresql.org/
.. _ElasticSearch: https://www.elastic.co/products/elasticsearch
.. _ElasticSearch ICU Analysis: https://github.com/elastic/elasticsearch-analysis-icu
.. _Elasticsearch: https://www.elastic.co/products/elasticsearch
.. _Elasticsearch ICU Analysis: https://github.com/elastic/elasticsearch-analysis-icu
.. _NSQ: http://nsq.io/
.. _Redis: http://redis.io/

Expand Down Expand Up @@ -54,15 +54,15 @@ Configuring container dependencies
At a minimum, you will need:

- a PostgreSQL database
- an ElasticSearch server with the ICU analysis plugin enabled
- an Elasticsearch server with the ICU analysis plugin enabled
- an nsqd server
- a Redis server
- a mailer

One option is to containerise these services, although you should investigate
for yourself if this is a sensible approach for your environment.

For example, we choose to run ElasticSearch, nsqd, and Redis in containers. We
For example, we choose to run Elasticsearch, nsqd, and Redis in containers. We
also use an `ambassador container`_ to point to our mailserver::

$ docker run -d --name elasticsearch nickstenning/elasticsearch-icu
Expand Down Expand Up @@ -130,7 +130,7 @@ options:
- ``ALLOWED_ORIGINS`` origins allowed to connect over the WebSocket protocol
- ``CLIENT_ID`` a unique API key for authentication
- ``CLIENT_SECRET`` a unique API secret for signing authentication requests
- ``ELASTICSEARCH_INDEX`` the ElasticSearch index name for annotation storage
- ``ELASTICSEARCH_INDEX`` the Elasticsearch index name for annotation storage
- ``MAIL_DEFAULT_SENDER`` a sender address for outbound mail
- ``WEBASSETS_BASE_DIR`` the base directory for static assets
- ``WEBASSETS_BASE_URL`` the base URL for static asset routes
8 changes: 4 additions & 4 deletions docs/hacking/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ installed:

You'll also need to run, at a minimum, these external services:

- ElasticSearch_ v1.0+, with the `ElasticSearch ICU Analysis`_ plugin
- Elasticsearch_ v1.0+, with the `Elasticsearch ICU Analysis`_ plugin
installed
- NSQ_ v0.3+

.. _Python: http://python.org/
.. _Node: http://nodejs.org/
.. _Compass: http://compass-style.org/
.. _ElasticSearch: http://www.elasticsearch.org/
.. _ElasticSearch ICU Analysis: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-icu-plugin.html
.. _Elasticsearch: http://www.elasticsearch.org/
.. _Elasticsearch ICU Analysis: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-icu-plugin.html
.. _NSQ: http://nsq.io/
.. _PostgreSQL: http://www.postgresql.org/

Expand Down Expand Up @@ -120,7 +120,7 @@ Install compass:
Installing the services
-----------------------

h requires ElasticSearch_ 1.0+ with the `ElasticSearch ICU Analysis`_ plugin,
h requires Elasticsearch_ 1.0+ with the `Elasticsearch ICU Analysis`_ plugin,
`NSQ`_ 0.3+ and `PostgreSQL`_ 9.4+. You can install these services however you
want, but the easiest way is by using Docker. This should work on any operating
system that Docker can be installed on:
Expand Down
10 changes: 5 additions & 5 deletions h/api/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ def _ensure_es_plugins(es_conn):
# pylint: disable=unexpected-keyword-arg
names = [x.strip() for x in es_conn.cat.plugins(h='component').split('\n')]
if 'analysis-icu' not in names:
message = ("ICU Analysis plugin is not installed for ElasticSearch\n"
message = ("ICU Analysis plugin is not installed for Elasticsearch\n"
" See the installation instructions for more details:\n"
" https://github.com/hypothesis/h/blob/master/"
"INSTALL.rst#installing")
raise RuntimeError(message)


def create_db():
"""Create the ElasticSearch index for Annotations and Documents."""
"""Create the Elasticsearch index for Annotations and Documents."""
# Check for required plugin(s)
_ensure_es_plugins(es.conn)

Expand Down Expand Up @@ -76,7 +76,7 @@ def create_db():
'settings': {'analysis': analysis},
})
except elasticsearch_exceptions.ConnectionError as e:
msg = ('Can not access ElasticSearch at {0}! '
msg = ('Can not access Elasticsearch at {0}! '
'Check to ensure it is running.').format(es.host)
raise elasticsearch_exceptions.ConnectionError('N/A', msg, e)

Expand Down Expand Up @@ -140,11 +140,11 @@ def bind_engine(engine, base=Base, should_create=False, should_drop=False):


def includeme(config):
"""Configure and possibly initialize ElasticSearch and its models."""
"""Configure and possibly initialize Elasticsearch and its models."""
registry = config.registry
settings = registry.settings

# Configure ElasticSearch
# Configure Elasticsearch
es = store_from_settings(settings)

# Add a property to all requests for easy access to the elasticsearch
Expand Down

0 comments on commit 2a8cc81

Please sign in to comment.