Skip to content
Permalink
Browse files
Upgraded to elasticsearch 5.x. Added sankey endpoint.
  • Loading branch information
michellebeard committed Aug 7, 2017
1 parent 9f745a7 commit 7d85458dd104d7e7a226531e97882c2f5d4ce652
Showing 17 changed files with 551 additions and 181 deletions.
@@ -14,6 +14,7 @@
# limitations under the License.

.DS_Store
.idea

# Byte-compiled / optimized / DLL files
__pycache__/
@@ -1,8 +1,7 @@
include MANIFEST.in
include README.md
include CHANGELOG.md
include LICENSE.txt
include setup.py
include *.rst
include NOTICE LICENSE DISCLAIMER.txt
include setup.py setup.cfg

# Include all sources
graft distill
@@ -13,28 +13,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from flask import Flask
from elasticsearch_dsl.connections import connections

# Initialize Flask instance
app = Flask(__name__)
from distill.config.elasticsearch import ELASTICSEARCH_PARAMS

# Load Configurations
app.config.from_pyfile('config/config.cfg')

# Unpack Elasticsearch configuration and create elasticsearch connection
host = app.config['ES_HOST']
port = app.config['ES_PORT']
http_auth = app.config['HTTP_AUTH']
use_ssl = app.config['USE_SSL']
verify_certs = app.config['VERIFY_CERTS']
ca_certs = app.config['CA_CERTS']
client_cert = app.config['CLIENT_CERT']
client_key = app.config['CLIENT_KEY']
timeout = app.config['TIMEOUT']
host = ELASTICSEARCH_PARAMS['host']
port = ELASTICSEARCH_PARAMS['port']
http_auth = ELASTICSEARCH_PARAMS['http_auth']
use_ssl = ELASTICSEARCH_PARAMS['use_ssl']
verify_certs = ELASTICSEARCH_PARAMS['verify_certs']
ca_certs = ELASTICSEARCH_PARAMS['ca_certs']
client_cert = ELASTICSEARCH_PARAMS['client_cert']
client_key = ELASTICSEARCH_PARAMS['client_key']
timeout = ELASTICSEARCH_PARAMS['timeout']

# Initialize Elasticsearch instance
es = connections.create_connection(hosts=[host],
es = connections.create_connection(hosts=host,
port=port,
http_auth=http_auth,
use_ssl=use_ssl,

0 comments on commit 7d85458

Please sign in to comment.