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 self.oauth_client | |
OAuth2::Client.new( | |
AppConfig.slack_api_client.client_id, | |
AppConfig.slack_api_client.client_secret, | |
site: 'https://slack.com', | |
authorize_url: '/oauth/authorize', | |
token_url: '/api/oauth.access', | |
) | |
end |
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
# Create a new index | |
curl -XPUT http://localhost:9200/newindex | |
# Create a nested mapping | |
curl -XPUT http://localhost:9200/newindex/foo/_mapping -d '{"foo" : {"properties": { "nested_field" : { "type": "nested" }} }}' | |
# Add a document | |
curl -XPUT http://localhost:9200/newindex/foo/5812395 -d '{ "nested_field" : [ { "name" : "blue", "count" : 4 }, { "name" : "green", "count" : 6 } ], "id":5812395 }' | |
# Refresh the index |