- Visit the elastic-swiftype GCP project
- if you don't have access, talk to @kellen and @bvans about getting access
- Click
CREATE INSTANCE
- Name the instance
- Select a region
- Set the
Machine type
to n1-standard-4 - Change the
Boot disk
and set the follow parameters
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
require 'httpclient' | |
require 'json' | |
require 'uri' | |
# -------------------------------------- | |
# Edit these variables | |
HOST = 'http://localhost:9200' | |
ELASTICSEARCH_USERNAME = 'elastic' | |
ELASTICSEARCH_PASSWORD = 'changeme' | |
DRY_RUN = false # don't actually edit anything yet |
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
require 'httpclient' | |
require 'json' | |
require 'uri' | |
# -------------------------------------- | |
# Edit these variables | |
HOST = 'http://localhost:9200' | |
ELASTICSEARCH_USERNAME = 'elastic' | |
ELASTICSEARCH_PASSWORD = 'changeme' | |
DRY_RUN = false # don't actually edit anything yet |
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
require 'json' | |
require 'elastic-site-search' # gem install elastic-site-search | |
require 'pry' | |
class RankingComparer | |
API_ENDPOINT = 'http://localhost:3002/api/v1/' | |
API_KEY = 'uQTxqyzMRxYMXgnnxVU1' | |
PAGE_SIZE = 40 | |
attr_reader :base_engine_name, :new_engine_name |
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
def spongebob_case(string) | |
string.split('.').map do |sentence| | |
capital = false | |
sentence.strip.split.map do |word| | |
if word.downcase == 'i' | |
'I' | |
else | |
capital = false | |
word.each_char.map do |char| | |
if char.downcase == 'l' |