This file contains hidden or 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
package de.spinscale.cluster; | |
import io.undertow.Undertow; | |
import io.undertow.server.handlers.PathTemplateHandler; | |
import io.undertow.util.HttpString; | |
import io.undertow.util.PathTemplateMatch; | |
import org.jgroups.JChannel; | |
import org.jgroups.raft.RaftHandle; | |
import org.jgroups.raft.blocks.ReplicatedStateMachine; |
This file contains hidden or 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 /foo/bar/1 | |
{ | |
"field1" : "foo", | |
"field2" : "foo" | |
} | |
PUT /foo/bar/2 | |
{ | |
"field1" : "bar", | |
"field2" : "bar" |
This file contains hidden or 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
[INFO] Scanning for projects... | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Reactor Build Order: | |
[INFO] | |
[INFO] Elasticsearch Build Resources | |
[INFO] Elasticsearch Rest API Spec | |
[INFO] Elasticsearch Parent POM | |
[INFO] Elasticsearch Core | |
[INFO] Elasticsearch Distribution | |
[INFO] Elasticsearch with all optional dependencies |
This file contains hidden or 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
# log levels | |
elasticsearch rule /\[INFO(\s*)]/ --> green match | |
elasticsearch rule /\[ERROR(\s*)]/ --> red match | |
elasticsearch rule /\[DEBUG(\s*)]/ --> yellow match | |
elasticsearch rule /\[TRACE(\s*)]/ --> yellow match | |
elasticsearch rule /\[WARN(\s*)]/ --> yellow match | |
# events | |
elasticsearch rule " new_master " --> bold cyan match | |
elasticsearch rule " added " --> bold cyan match |
This file contains hidden or 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
var fs = require('fs') | |
var _ = require('lodash') | |
var request = require('request') | |
var cheerio = require('cheerio') | |
var ProgressBar = require('progress'); | |
var printf = require('printf'); | |
var presentations = [] | |
var data = fs.readFileSync('urls.txt', { encoding: 'UTF-8' }).split("\n") |
This file contains hidden or 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
DELETE /hotels | |
POST /hotels/hotel/_bulk | |
{ "index" : { "_id" : 1 }} | |
{ "features": [ "wifi", "parking" ], "stars" : 1 } | |
{ "index" : { "_id" : 2 }} | |
{ "features": [ "pool", "parking" ], "stars" : 4 } | |
{ "index" : { "_id" : 3 }} | |
{ "features": [ "wifi", "pool" ], "stars" : 5 } |
This file contains hidden or 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
# Colorful output, if you are on the console only | |
#appender.console.layout.pattern = %highlight{[%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n} | |
appender.console.layout.pattern = %style{[%d{ISO8601}]}{cyan}%style{[%-5p]}{magenta}%style{[%-25c{1.}]}{green} %marker%m%n |
This file contains hidden or 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
POST _ingest/pipeline/_simulate | |
{ | |
"pipeline" : { | |
"description": "A pipeline to do named entity extraction", | |
"processors": [ | |
{ | |
"script": { | |
"lang": "painless", | |
"inline": "ctx.params = [:] ; /&/.splitAsStream(ctx.x).forEach(pair -> { def x = /=/.split(pair); ctx.params[x[0]] = x[1]; })" | |
} |
This file contains hidden or 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
DELETE _all | |
GET index/_mapping | |
PUT index | |
{ | |
"settings": { | |
"analysis": { | |
"analyzer": { | |
"my_analyzer": { |
This file contains hidden or 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
DELETE _all | |
PUT _ingest/pipeline/rename_hostname | |
{ | |
"processors": [ | |
{ | |
"rename": { | |
"field": "hostname", | |
"target_field": "host", | |
"ignore_missing": true |