This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a | |
aah | |
aahed | |
aahing | |
aahs | |
aardvark | |
aardvarks | |
aardwolf | |
ab | |
abaci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET /_search | |
{ | |
"sort": [ | |
{ | |
"arrayField.complexSortField": { | |
"order": "desc" | |
} | |
} | |
], | |
"query": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Doc 1 | |
{ | |
"id": 1, | |
"field1": "value1", | |
"field2": "value2", | |
"arrayField": [ | |
{ | |
"complexSortField": 10, | |
"complexField": "complexValue" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PUT stage-logs-000001 | |
{ | |
"aliases": { | |
"stagelogs": { | |
"is_write_index": true | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PUT _template/log_template | |
{ | |
"index_patterns": ["log-*"], | |
"settings": { | |
"index": { | |
"lifecycle": { | |
"name": "logs_policy", | |
"rollover_alias": "rolloverlogs" | |
}, | |
"number_of_shards": "5", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PUT _ilm/policy/logs_policy | |
{ | |
"policy": { | |
"phases": { | |
"warm": { | |
"min_age": "1h", | |
"actions": { | |
"allocate": { | |
"number_of_replicas": 0 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from readypipe import requests, starting_task, subtask, schedule, save, schedule_many | |
import datetime | |
CHART_URL = 'https://spotifycharts.com/regional/%s/daily/%s' | |
@starting_task | |
def load_todays_urls(): | |
chart_page = requests.get_dom_from_content(CHART_URL % ('global', 'latest')) #visit latest page | |
countries_set = set() | |
yesterday = (datetime.datetime.today() - datetime.timedelta(days=1)).strftime('%Y-%m-%d') #get yesterday's date |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get --purge autoremove elasticsearch | |
rm -rf /var/lib/elasticsearch/ | |
rm -rf /usr/share/elasticsearch/ | |
rm -rf /etc/init.d/elasticsearch | |
rm -rf /etc/elasticsearch/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ELASTICSEARCH_VERSION=1.7.6 | |
### Download and install the Public Signing Key | |
wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-${ELASTICSEARCH_VERSION}.deb | |
### Install Elasticsearch | |
sudo dpkg -i elasticsearch-${ELASTICSEARCH_VERSION}.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##################### Elasticsearch Configuration Example ##################### | |
# This file contains an overview of various configuration settings, | |
# targeted at operations staff. Application developers should | |
# consult the guide at <http://elasticsearch.org/guide>. | |
# | |
# The installation procedure is covered at | |
# <http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup.html>. | |
# | |
# Elasticsearch comes with reasonable defaults for most settings, |