Skip to content

Instantly share code, notes, and snippets.

View zumo64's full-sized avatar

Christian Zumbiehl zumo64

View GitHub Profile
@zumo64
zumo64 / Search Workshop
Created September 26, 2016 12:32
search workshop
GET _cat/health
GET _cat/indices
GET /_cat/plugins
DELETE melimemo
PUT melimemo
@zumo64
zumo64 / gist:1bd3075940e69b7ca928b717a863b451
Created July 21, 2016 13:56
Templates and Alias management example (ES 2.x)
PUT /test {
"mappings" : {
"my_type" : {
"dynamic_templates" : [
{
"my_integer_fields" : {
"match" : "i_*",
"mapping" : { "type" : "integer" }
}
},
@zumo64
zumo64 / shield worshop
Last active September 22, 2016 11:43
# on port 9201
DELETE /index_es1
PUT /index_es1
{
"settings": {
"number_of_shards": 1
, "number_of_replicas": 0
}
PUT /log
{
"mappings": {
"log": {
"properties": {
"host": {
"type": "string",
"index": "not_analyzed"
}
}
# Start
PUT _template/my_data_template1
{
"template": "my_data_*",
"settings": {
"number_of_shards": 1
#!/usr/bin/env python
import os
import sys
import time
import json
from collections import defaultdict
from random import randint, choice
from datetime import datetime
startTime = datetime.now()
PUT issue
{
"settings": {
"number_of_replicas": 0,
"number_of_shards": 1
},
"mappings": {
"typ": {
"properties": {
DELETE adns_suggest_test
PUT /adns_suggest_test
{
"settings": {
"analysis": {
"filter": {
"world_separator_filter": {
"catenate_all": "true",
"type": "word_delimiter"