| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| [Elasticsearch](https://www.elastic.co/) can be used as a storage backend for |
| the meta data repository. |
| |
| INFO: Starting from 0.11.0, if you build PredictionIO against Elasticsearch 5+, |
| you may also use it as a backend for the event data repository. |
| |
| ``` |
| $ wget https://artifacts.elastic.co/downloads/elasticsearch/<%= data.versions.elasticsearch_download_filename %>.tar.gz |
| $ tar zxvfC <%= data.versions.elasticsearch_download_filename %>.tar.gz PredictionIO-<%= data.versions.pio %>/vendors |
| ``` |
| |
| INFO: If you decide to install Elasticsearch to another location, you must edit |
| `PredictionIO-<%= data.versions.pio %>/conf/pio-env.sh` and change the |
| `PIO_STORAGE_SOURCES_ELASTICSEARCH_HOME` variable to point to your own |
| Elasticsearch installation. |
| |
| INFO: If you are using a shared network, change the `network.host` line in |
| `PredictionIO-<%= data.versions.pio %>/vendors/<%= |
| data.versions.elasticsearch_download_filename %>/config/elasticsearch.yml` to |
| `network.host: 127.0.0.1` because by default, Elasticsearch looks for other |
| machines on the network upon setup and you may run into weird errors if there |
| are other machines that is also running Elasticsearch. |
| |
| If you are not using the default setting at `localhost`, you may change the |
| following in `PredictionIO-<%= data.versions.pio %>/conf/pio-env.sh` to fit your |
| setup. |
| |
| ``` |
| PIO_STORAGE_SOURCES_ELASTICSEARCH_TYPE=elasticsearch |
| PIO_STORAGE_SOURCES_ELASTICSEARCH_HOSTS=localhost |
| PIO_STORAGE_SOURCES_ELASTICSEARCH_PORTS=9300 |
| ``` |